Skip to content

Commit

Permalink
fix sd model convert bug (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
Songyuanwei authored Aug 29, 2024
1 parent bc82f54 commit 89256b1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

def _load_torch_ckpt(ckpt_file):
source_data = torch.load(ckpt_file, map_location="cpu")
if ["state_dict"] in source_data:
if "state_dict" in source_data:
source_data = source_data["state_dict"]
return source_data

Expand Down

0 comments on commit 89256b1

Please sign in to comment.