Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

Merge origin/main into model-manager-hardening

JPPhoto90f97edb0843
diff --cc invokeai/backend/model_manager/configs/factory.py
index 3e612eec4c,1c893d06d8..fba2f7be9f
--- a/invokeai/backend/model_manager/configs/factory.py
+++ b/invokeai/backend/model_manager/configs/factory.py
@@@ -862,18 -884,11 +884,20 @@@ class ModelConfigFactory
for candidate_class in filter(lambda x: x is not Unknown_Config, Config_Base.CONFIG_CLASSES):
candidate_name = candidate_class.__name__
try:
+ candidate_fields = fields
+ # Preserve the explicit encoder choice for InvokeAI IP-Adapter probes; this field is not part of
+ # the common model record changes, but re-identification can carry it from the stored config.
+ if (
+ override_fields is not None
+ and "image_encoder_model_id" in override_fields
+ and "image_encoder_model_id" in candidate_class.model_fields
+ ):
+ candidate_fields = {**fields, "image_encoder_model_id": override_fields["image_encoder_model_id"]}
# Technically, from_model_on_disk returns a Config_Base, but in practice it will always be a member of
# the AnyModelConfig union.
- details[candidate_name] = candidate_class.from_model_on_disk(mod, candidate_fields) # type: ignore
- candidate = candidate_class.from_model_on_disk(mod, fields)
++ candidate = candidate_class.from_model_on_disk(mod, candidate_fields)
+ ModelConfigFactory._raise_for_unsupported_gguf_quantization(mod, candidate)
+ details[candidate_name] = candidate # type: ignore
except NotAMatchError as e:
# This means the model didn't match this config class. It's not an error, just no match.
details[candidate_name] = ModelConfigFactory._detach_traceback(e)