mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'refactor/model-manager-2' of github.com:invoke-ai/InvokeAI into refactor/model-manager-2
This commit is contained in:
commit
eebc0e7315
@ -142,10 +142,10 @@ class ModelRecordServiceBase(ABC):
|
|||||||
model_configs = self.search_by_name(model_name=model_name, base_model=base_model, model_type=model_type)
|
model_configs = self.search_by_name(model_name=model_name, base_model=base_model, model_type=model_type)
|
||||||
if len(model_configs) > 1:
|
if len(model_configs) > 1:
|
||||||
raise DuplicateModelException(
|
raise DuplicateModelException(
|
||||||
"More than one model share the same name and type: {base_model}/{model_type}/{model_name}"
|
f"More than one model matched the search criteria: base_model='{base_model}', model_type='{model_type}', model_name='{model_name}'."
|
||||||
)
|
)
|
||||||
if len(model_configs) == 0:
|
if len(model_configs) == 0:
|
||||||
raise UnknownModelException("No known model with name and type: {base_model}/{model_type}/{model_name}")
|
raise UnknownModelException(f"More than one model matched the search criteria: base_model='{base_model}', model_type='{model_type}', model_name='{model_name}'.")
|
||||||
return model_configs[0]
|
return model_configs[0]
|
||||||
|
|
||||||
def rename_model(
|
def rename_model(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user