"torchvision/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "d38600fee193e8b9f97f3ec5ea02d3fd355cf6a0"
Commit d67c3051 authored by Patrick von Platen's avatar Patrick von Platen
Browse files

allow conversion from no state dict checkpoints

parent 2bd53a94
...@@ -866,7 +866,9 @@ if __name__ == "__main__": ...@@ -866,7 +866,9 @@ if __name__ == "__main__":
else: else:
print("global_step key not found in model") print("global_step key not found in model")
global_step = None global_step = None
checkpoint = checkpoint["state_dict"]
if "state_dict" in checkpoint:
checkpoint = checkpoint["state_dict"]
upcast_attention = False upcast_attention = False
if args.original_config_file is None: if args.original_config_file is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment