From 72a3e776b2ce323b1c2b04ba75288a386399e6a7 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Mon, 7 Aug 2023 15:38:22 -0400 Subject: [PATCH] fix logic error introduced in PR 4109 --- invokeai/backend/model_management/model_manager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/invokeai/backend/model_management/model_manager.py b/invokeai/backend/model_management/model_manager.py index 0bad714a17..ee2e3b8076 100644 --- a/invokeai/backend/model_management/model_manager.py +++ b/invokeai/backend/model_management/model_manager.py @@ -546,9 +546,10 @@ class ModelManager(object): the combined format of the list_models() method. """ models = self.list_models(base_model, model_type, model_name) - if len(models) > 1: + if len(models) >= 1: return models[0] - return None + else: + return None def list_models( self,