aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-11-04 07:54:17 +0000
committerGitHub <noreply@github.com>2022-11-04 07:54:17 +0000
commit24fc05cf576c80976773d09b341b9c9b2274a492 (patch)
tree89829bec0144ac0da7c0ae340cd8435427efb01e /modules/sd_models.py
parenta613fbc05e037622e1f20667d428be3f72894f16 (diff)
parent352b33106a64a8c34d1f5d79fcb377a73b02e39c (diff)
downloadstable-diffusion-webui-gfx803-24fc05cf576c80976773d09b341b9c9b2274a492.tar.gz
stable-diffusion-webui-gfx803-24fc05cf576c80976773d09b341b9c9b2274a492.tar.bz2
stable-diffusion-webui-gfx803-24fc05cf576c80976773d09b341b9c9b2274a492.zip
Merge branch 'master' into fix-ckpt-cache
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index cf7b79ce..63e07a12 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -198,8 +198,9 @@ def load_model_weights(model, checkpoint_info, vae_file="auto"):
model.first_stage_model.to(devices.dtype_vae)
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")
model.load_state_dict(checkpoints_loaded[checkpoint_info])
if shared.opts.sd_checkpoint_cache > 0: