diff options
author | Greendayle <Greendayle> | 2022-10-08 14:27:48 +0000 |
---|---|---|
committer | Greendayle <Greendayle> | 2022-10-08 14:27:48 +0000 |
commit | 2e8ba0fa478eb076760dc0fdfc526f6f5f1f98c5 (patch) | |
tree | 18bd69791e0eff3affd59876f8b39e9150aa8e2b /modules/sd_models.py | |
parent | 5f12e7efd92ad802742f96788b4be3249ad02829 (diff) | |
parent | 4f33289d0fc5aa3a197f4a4c926d03d44f0d597e (diff) | |
download | stable-diffusion-webui-gfx803-2e8ba0fa478eb076760dc0fdfc526f6f5f1f98c5.tar.gz stable-diffusion-webui-gfx803-2e8ba0fa478eb076760dc0fdfc526f6f5f1f98c5.tar.bz2 stable-diffusion-webui-gfx803-2e8ba0fa478eb076760dc0fdfc526f6f5f1f98c5.zip |
fix conflicts
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r-- | modules/sd_models.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index 8f794b47..9409d070 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -122,7 +122,11 @@ def load_model_weights(model, checkpoint_file, sd_model_hash): pl_sd = torch.load(checkpoint_file, map_location="cpu")
if "global_step" in pl_sd:
print(f"Global Step: {pl_sd['global_step']}")
- sd = pl_sd["state_dict"]
+
+ if "state_dict" in pl_sd:
+ sd = pl_sd["state_dict"]
+ else:
+ sd = pl_sd
model.load_state_dict(sd, strict=False)
|