Skip to content

Commit 48904a6

Browse files
committed
Fix loading safetensors with load_model_from_config
Previously, the `sd` from the safetensors if branch was not used at all, and `pl_sd` would have not been assigned.
1 parent 5c10dee commit 48904a6

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

sgm/util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ def load_model_from_config(config, ckpt, verbose=True, freeze=True):
212212
raise NotImplementedError
213213

214214
model = instantiate_from_config(config.model)
215-
sd = pl_sd["state_dict"]
216215

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

0 commit comments

Comments
 (0)