From 90f32d17ba15d17afcf715fbe7ecb5c89e51a41e Mon Sep 17 00:00:00 2001 From: brandonrising Date: Mon, 25 Mar 2024 20:53:35 -0400 Subject: [PATCH] Use correct format type on model --- invokeai/backend/model_manager/probe.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invokeai/backend/model_manager/probe.py b/invokeai/backend/model_manager/probe.py index 8d3818df58..441e316ce3 100644 --- a/invokeai/backend/model_manager/probe.py +++ b/invokeai/backend/model_manager/probe.py @@ -147,6 +147,7 @@ class ModelProbe(object): probe = probe_class(model_path) model_path = probe.model_path + format_type = probe.get_format() fields["source_type"] = fields.get("source_type") or ModelSourceType.Path fields["source"] = fields.get("source") or model_path.as_posix() fields["key"] = fields.get("key", uuid_string()) @@ -160,7 +161,8 @@ class ModelProbe(object): fields["description"] = ( fields.get("description") or f"{fields['base'].value} {model_type.value} model {fields['name']}" ) - fields["format"] = fields.get("format") or probe.get_format() + fields["format"] = fields.get("format") or format_type + fields["hash"] = fields.get("hash") or ModelHash(algorithm=hash_algo).hash(model_path) fields["default_settings"] = fields.get("default_settings")