From 05cf4be89b6f992bb9e825ec24b81539406003d6 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 11 Oct 2024 12:05:29 +0530 Subject: [PATCH] Check for context attr --- 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 6e8c9325..b21ac181 100644 --- a/ui/easydiffusion/model_manager.py +++ b/ui/easydiffusion/model_manager.py @@ -107,7 +107,7 @@ def unload_all(context: Context): for model_type in KNOWN_MODEL_TYPES: backend.unload_model(context, model_type) - if model_type in context.model_load_errors: + if hasattr(context, "model_load_errors") and model_type in context.model_load_errors: del context.model_load_errors[model_type]