Skip to content

Commit 85d3ded

Browse files
xiu-csCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 6124bfd commit 85d3ded

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

animals/demo/vis_animals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def get_pose3D(path, output_dir, type='image'):
339339
model_dict = model['CFM'].state_dict()
340340
model_path = args.saved_model_path
341341
print(f"Loading model from: {model_path}")
342-
pre_dict = torch.load(model_path, weights_only=True)
342+
pre_dict = torch.load(model_path, map_location=device, weights_only=True)
343343
for name, key in model_dict.items():
344344
model_dict[name] = pre_dict[name]
345345
model['CFM'].load_state_dict(model_dict)

0 commit comments

Comments
 (0)