Skip to content

Commit 11f6909

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

animals/scripts/main_animal3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def get_parameter_number(net):
274274
# Prefer explicit saved_model_path; otherwise fallback to previous_dir glob
275275
model_path = args.saved_model_path
276276
print(model_path)
277-
pre_dict = torch.load(model_path, weights_only=True)
277+
pre_dict = torch.load(model_path, weights_only=True, map_location=device)
278278
for name, key in model_dict.items():
279279
model_dict[name] = pre_dict[name]
280280
model['CFM'].load_state_dict(model_dict)

0 commit comments

Comments
 (0)