mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(mm): ensure unknown model configs get unknown attrs
This commit is contained in:
@@ -323,7 +323,13 @@ class ModelConfigFactory:
|
||||
|
||||
if not matches and app_config.allow_unknown_models:
|
||||
logger.warning(f"Unable to identify model {mod.name}, falling back to Unknown_Config")
|
||||
return Unknown_Config(**fields)
|
||||
return Unknown_Config(
|
||||
**fields,
|
||||
# Override the type/format/base to ensure it's marked as unknown.
|
||||
base=BaseModelType.Unknown,
|
||||
type=ModelType.Unknown,
|
||||
format=ModelFormat.Unknown,
|
||||
)
|
||||
|
||||
if len(matches) > 1:
|
||||
# We have multiple matches, in which case at most 1 is correct. We need to pick one.
|
||||
|
||||
Reference in New Issue
Block a user