1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

allow conversion from no state dict checkpoints

This commit is contained in:
Patrick von Platen
2023-01-03 19:48:13 +00:00
parent 2bd53a940c
commit d67c305120

View File

@@ -866,7 +866,9 @@ if __name__ == "__main__":
else:
print("global_step key not found in model")
global_step = None
checkpoint = checkpoint["state_dict"]
if "state_dict" in checkpoint:
checkpoint = checkpoint["state_dict"]
upcast_attention = False
if args.original_config_file is None: