mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fix crash when attempting to update a model (#4192)
## What type of PR is this? (check all applicable) - [X] Bug Fix ## Have you discussed this change with the InvokeAI team? - [X No, because small fix ## Have you updated all relevant documentation? - [X] Yes ## Description A logic bug was introduced in PR #4109 that caused Web-based model updates to fail with a pydantic validation error. This corrects the problem. ## Related Tickets & Documents PR #4109
This commit is contained in:
commit
1b1b399fd0
@ -595,9 +595,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,
|
||||
|
Loading…
Reference in New Issue
Block a user