From 8e8ebd91c00e5cb621342f4d13aadd693051037c Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Sat, 9 Mar 2024 17:19:31 +0100 Subject: [PATCH] fix: do not use default config values but actually load preset models --- launch.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/launch.py b/launch.py index d8ea16ea..9d23bb33 100644 --- a/launch.py +++ b/launch.py @@ -100,10 +100,10 @@ def download_models(default_model, previous_default_models, checkpoint_downloads return default_model, checkpoint_downloads if not args.always_download_new_model: - if not os.path.exists(os.path.join(config.paths_checkpoints[0], config.default_base_model_name)): + if not os.path.exists(os.path.join(config.paths_checkpoints[0], default_model)): for alternative_model_name in config.previous_default_models: if os.path.exists(os.path.join(config.paths_checkpoints[0], alternative_model_name)): - print(f'You do not have [{config.default_base_model_name}] but you have [{alternative_model_name}].') + print(f'You do not have [{default_model}] but you have [{alternative_model_name}].') print(f'Fooocus will use [{alternative_model_name}] to avoid downloading new models, ' f'but you are not using the latest models.') print('Use --always-download-new-model to avoid fallback and always get new models.') @@ -111,11 +111,11 @@ def download_models(default_model, previous_default_models, checkpoint_downloads default_model = alternative_model_name break - for file_name, url in config.checkpoint_downloads.items(): + for file_name, url in checkpoint_downloads.items(): load_file_from_url(url=url, model_dir=config.paths_checkpoints[0], file_name=file_name) - for file_name, url in config.embeddings_downloads.items(): + for file_name, url in embeddings_downloads.items(): load_file_from_url(url=url, model_dir=config.path_embeddings, file_name=file_name) - for file_name, url in config.lora_downloads.items(): + for file_name, url in lora_downloads.items(): load_file_from_url(url=url, model_dir=config.paths_loras[0], file_name=file_name) return default_model, checkpoint_downloads