aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorAngelBottomless <35677394+aria1th@users.noreply.github.com>2022-11-04 15:51:09 +0900
committerGitHub <noreply@github.com>2022-11-04 15:51:09 +0900
commit179702adc40cc8d9c97ae883ee9d0f7c79076047 (patch)
tree34b166971e0d8b5b2b8a7ec631d7395072f3f218 /modules/sd_models.py
parent0d07cbfa15d34294a4fa22d74359cdd6fe2f799c (diff)
parentf2b69709eaff88fc3a2bd49585556ec0883bf5ea (diff)
Merge branch 'AUTOMATIC1111:master' into force-push-patch-13
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 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])