Skip to content

Commit

Permalink
Fix loading safetensors with load_model_from_config
Browse files Browse the repository at this point in the history
Previously, the `sd` from the safetensors if branch was not used at all, and `pl_sd` would have not been assigned.
  • Loading branch information
akx committed Jul 17, 2023
1 parent 90aef8c commit 7ebdbf5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion sgm/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ def load_model_from_config(config, ckpt, verbose=True, freeze=True):
raise NotImplementedError

model = instantiate_from_config(config.model)
sd = pl_sd["state_dict"]

m, u = model.load_state_dict(sd, strict=False)

Expand Down

0 comments on commit 7ebdbf5

Please sign in to comment.