diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-04 05:57:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 05:57:18 +0000 |
commit | 3f0f3284b66cc64a30f7d6bd290e0bcdc6397bb6 (patch) | |
tree | 1a8e7da50a72b742fc1e4d9e11822882ae60ddcb | |
parent | 1ca4dd44c950dd0167e730e26786d591234f3efc (diff) | |
parent | 3780ad3ad837dd406da39eebd5d91009b5a58445 (diff) | |
download | stable-diffusion-webui-gfx803-3f0f3284b66cc64a30f7d6bd290e0bcdc6397bb6.tar.gz stable-diffusion-webui-gfx803-3f0f3284b66cc64a30f7d6bd290e0bcdc6397bb6.tar.bz2 stable-diffusion-webui-gfx803-3f0f3284b66cc64a30f7d6bd290e0bcdc6397bb6.zip |
Merge pull request #4249 from digburn/fix-cache-vae
Fix loading a model without a VAE from the cache
-rw-r--r-- | modules/sd_models.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index 5075fadb..ae427a5c 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -204,8 +204,9 @@ def load_model_weights(model, checkpoint_info, vae_file="auto"): checkpoints_loaded.popitem(last=False) # LRU
else:
- vae_name = sd_vae.get_filename(vae_file)
- print(f"Loading weights [{sd_model_hash}] with {vae_name} VAE from cache")
+ vae_name = sd_vae.get_filename(vae_file) if vae_file else None
+ vae_message = f" with {vae_name} VAE" if vae_name else ""
+ print(f"Loading weights [{sd_model_hash}]{vae_message} from cache")
checkpoints_loaded.move_to_end(checkpoint_key)
model.load_state_dict(checkpoints_loaded[checkpoint_key])
|