change default model on download

This commit is contained in:
Vladimir Mandic
2023-05-19 14:06:46 -04:00
parent 42280ef804
commit 6221ccba4f
+1
View File
@@ -118,6 +118,7 @@ def list_models():
key = input('Download the default model? (y/N) ')
if key.lower().startswith('y'):
model_url = "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors"
shared.opts.data['sd_model_checkpoint'] = "v1-5-pruned-emaonly.safetensors"
model_list = modelloader.load_models(model_path=model_path, model_url=model_url, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name="v1-5-pruned-emaonly.safetensors", ext_blacklist=[".vae.ckpt", ".vae.safetensors"])
for filename in sorted(model_list, key=str.lower):
checkpoint_info = CheckpointInfo(filename)