Skip to content

Commit 468ae2f

Browse files
fix(mm): ensure unknown model configs get unknown attrs
1 parent 05b04df commit 468ae2f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

invokeai/backend/model_manager/configs/factory.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,13 @@ def from_model_on_disk(
323323

324324
if not matches and app_config.allow_unknown_models:
325325
logger.warning(f"Unable to identify model {mod.name}, falling back to Unknown_Config")
326-
return Unknown_Config(**fields)
326+
return Unknown_Config(
327+
**fields,
328+
# Override the type/format/base to ensure it's marked as unknown.
329+
base=BaseModelType.Unknown,
330+
type=ModelType.Unknown,
331+
format=ModelFormat.Unknown,
332+
)
327333

328334
if len(matches) > 1:
329335
# We have multiple matches, in which case at most 1 is correct. We need to pick one.

0 commit comments

Comments
 (0)