aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-02-19 11:37:40 +0000
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-02-19 11:37:40 +0000
commitc77f01ff31072715afe80413ecaf6b3d00797d34 (patch)
treef00c886f5be486e8a8fc38091b6ad05bc638ec48 /modules/sd_models.py
parent72022133581e47a5b65075777522b392fb77b285 (diff)
downloadstable-diffusion-webui-gfx803-c77f01ff31072715afe80413ecaf6b3d00797d34.tar.gz
stable-diffusion-webui-gfx803-c77f01ff31072715afe80413ecaf6b3d00797d34.tar.bz2
stable-diffusion-webui-gfx803-c77f01ff31072715afe80413ecaf6b3d00797d34.zip
fix auto sd download issue
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 127e9663..ac4903f4 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -105,9 +105,15 @@ def checkpoint_tiles():
def list_models():
checkpoints_list.clear()
checkpoint_alisases.clear()
- model_list = modelloader.load_models(model_path=model_path, model_url="https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors", command_path=shared.cmd_opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name="v1-5-pruned-emaonly.safetensors", ext_blacklist=[".vae.ckpt", ".vae.safetensors"])
cmd_ckpt = shared.cmd_opts.ckpt
+ if shared.cmd_opts.no_download_sd_model or cmd_ckpt != shared.sd_model_file:
+ model_url = None
+ else:
+ model_url = "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors"
+
+ 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"])
+
if os.path.exists(cmd_ckpt):
checkpoint_info = CheckpointInfo(cmd_ckpt)
checkpoint_info.register()