Skip to content

Commit

Permalink
make it possible to save nai model using safetensors
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Nov 28, 2022
1 parent bb11bee commit 0376da1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/sd_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def transform_checkpoint_dict_key(k):


def get_state_dict_from_checkpoint(pl_sd):
if "state_dict" in pl_sd:
pl_sd = pl_sd["state_dict"]
pl_sd = pl_sd.pop("state_dict", pl_sd)
pl_sd.pop("state_dict", None)

sd = {}
for k, v in pl_sd.items():
Expand Down

0 comments on commit 0376da1

Please sign in to comment.