From 05c2de94506057101535ffd56a6583a60bf38e72 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 6 Jun 2023 16:56:37 +0530 Subject: [PATCH] Fail with an error if the desired model (non-Stable Diffusion) wasn't found --- ui/easydiffusion/model_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/easydiffusion/model_manager.py b/ui/easydiffusion/model_manager.py index 9953fd74..ef5166df 100644 --- a/ui/easydiffusion/model_manager.py +++ b/ui/easydiffusion/model_manager.py @@ -123,6 +123,9 @@ def resolve_model_to_use(model_name: str = None, model_type: str = None): ) return default_model_path + if model_name: + raise Exception(f"Could not find the desired model {model_name}! Is it present in the {model_dir} folder?") + return None