From ab5450bb27a6b28f8846ae0c40a82114fc09ac79 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 30 Aug 2023 14:39:43 +0530 Subject: [PATCH] Don't download codeformer and controlnet if not being used --- ui/easydiffusion/model_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/easydiffusion/model_manager.py b/ui/easydiffusion/model_manager.py index 6d19912e..90daadba 100644 --- a/ui/easydiffusion/model_manager.py +++ b/ui/easydiffusion/model_manager.py @@ -193,9 +193,9 @@ def resolve_model_paths(models_data: ModelsData): skip_models = cn_filters + ["latent_upscaler", "nsfw_checker"] if model_type in skip_models: # doesn't use model paths continue - if model_type == "codeformer": + if model_type == "codeformer" and model_paths[model_type]: download_if_necessary("codeformer", "codeformer.pth", "codeformer-0.1.0") - elif model_type == "controlnet": + elif model_type == "controlnet" and model_paths[model_type]: model_id = model_paths[model_type] model_info = get_model_info_from_db(model_type=model_type, model_id=model_id) if model_info: