murcherful commited on
Commit
6192832
·
1 Parent(s): 2003211

fix load state

Browse files
XPart/partgen/partformer_pipeline.py CHANGED
@@ -190,7 +190,7 @@ class PartFormerPipeline(TokenAllocMixin):
190
  ckpt[model_name][new_key] = value
191
  else:
192
  # ckpt = torch.load(ckpt_path, map_location="cpu", weights_only=True)
193
- ckpt = torch.load(ckpt_path, map_location="cpu")
194
  # load model
195
  model = instantiate_from_config(config["model"])
196
  # model.load_state_dict(ckpt["model"])
@@ -239,7 +239,7 @@ class PartFormerPipeline(TokenAllocMixin):
239
  ckpt_path = smart_load_model(
240
  model_path="tencent/Hunyuan3D-Part",
241
  )
242
- ckpt = torch.load(os.path.join(ckpt_path, "xpart.pt"), map_location="cpu")
243
  # load model
244
  model = instantiate_from_config(config["model"])
245
  # model.load_state_dict(ckpt["model"])
 
190
  ckpt[model_name][new_key] = value
191
  else:
192
  # ckpt = torch.load(ckpt_path, map_location="cpu", weights_only=True)
193
+ ckpt = torch.load(ckpt_path, weights_only=False, map_location="cpu")
194
  # load model
195
  model = instantiate_from_config(config["model"])
196
  # model.load_state_dict(ckpt["model"])
 
239
  ckpt_path = smart_load_model(
240
  model_path="tencent/Hunyuan3D-Part",
241
  )
242
+ ckpt = torch.load(os.path.join(ckpt_path, "xpart.pt"), weights_only=False, map_location="cpu")
243
  # load model
244
  model = instantiate_from_config(config["model"])
245
  # model.load_state_dict(ckpt["model"])