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.

Fix model reidentify losing path and failing on IP Adapters (#8941)

Alexander Eichhorndf225d375113
diff --git a/invokeai/app/api/routers/model_manager.py b/invokeai/app/api/routers/model_manager.py
index 234c6c9662..9d5b41e7f5 100644
--- a/invokeai/app/api/routers/model_manager.py
+++ b/invokeai/app/api/routers/model_manager.py
@@ -246,11 +246,13 @@ async def reidentify_model(
raise InvalidModelException("Unable to identify model format")
# Retain user-editable fields from the original config
+ result.config.path = config.path
result.config.key = config.key
result.config.name = config.name
result.config.description = config.description
result.config.cover_image = config.cover_image
- result.config.trigger_phrases = config.trigger_phrases
+ if hasattr(config, "trigger_phrases") and hasattr(result.config, "trigger_phrases"):
+ result.config.trigger_phrases = config.trigger_phrases
result.config.source = config.source
result.config.source_type = config.source_type