Merge pull request #43 from akx/fix-safetensors-load

Fix loading safetensors with load_model_from_config
This commit is contained in:
Jonas Müller
2023-07-21 18:00:53 +02:00
committed by GitHub

View File

@@ -212,7 +212,6 @@ def load_model_from_config(config, ckpt, verbose=True, freeze=True):
raise NotImplementedError raise NotImplementedError
model = instantiate_from_config(config.model) model = instantiate_from_config(config.model)
sd = pl_sd["state_dict"]
m, u = model.load_state_dict(sd, strict=False) m, u = model.load_state_dict(sd, strict=False)