From 9a528496a34eb35ce2f67a5cf3a53c7bddcd3167 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 3 Aug 2023 15:13:41 +0530 Subject: [PATCH] Reload the model if the path exists in the request but the model has been unloaded --- ui/easydiffusion/model_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/easydiffusion/model_manager.py b/ui/easydiffusion/model_manager.py index 63f79859..845e9126 100644 --- a/ui/easydiffusion/model_manager.py +++ b/ui/easydiffusion/model_manager.py @@ -148,7 +148,7 @@ def reload_models_if_necessary(context: Context, models_data: ModelsData, models models_to_reload = { model_type: path for model_type, path in models_data.model_paths.items() - if context.model_paths.get(model_type) != path + if context.model_paths.get(model_type) != path or (path is not None and context.models.get(model_type) is None) } if models_data.model_paths.get("codeformer"):