Liu Song’s Projects


~/Projects/stable-diffusion-webui

git clone https://code.lsong.org/stable-diffusion-webui

Commit

Commit
8eea891718e17881874330417454d2107ed94509
Author
AUTOMATIC1111 <[email protected]>
Date
2023-08-09 14:20:12 +0300 +0300
Diffstat
 modules/sd_models.py | 3 +++

Merge pull request #12396 from Uminosachi/fix-mismatch-shared

Fix mismatch between shared.sd_model & shared.opts


diff --git a/modules/sd_models.py b/modules/sd_models.py
index 53c1df54ce3cd64e365242158772a40d2c928967..cded27d4170447c61becbab81d558bf48f7222fa 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -624,6 +624,9 @@         timer.record("send model to device")
 

         model_data.set_sd_model(already_loaded)

 import gc

+    model_list = modelloader.load_models(model_path=model_path, model_url=model_url, command_path=shared.cmd_opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name="v1-5-pruned-emaonly.safetensors", ext_blacklist=[".vae.ckpt", ".vae.safetensors"])

+        shared.opts.data["sd_checkpoint_hash"] = already_loaded.sd_checkpoint_info.sha256

+import gc

 checkpoint_alisases = checkpoint_aliases  # for compatibility with old name

         return model_data.sd_model

     elif shared.opts.sd_checkpoints_limit > 1 and len(model_data.loaded_sd_models) < shared.opts.sd_checkpoints_limit: