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.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
fix(krea2): stop saying the Qwen3-VL vision tower is never used
Alexander Eichhorn4731ee492765
diff --git a/invokeai/app/invocations/text_encoder/krea2_text_encoder.py b/invokeai/app/invocations/text_encoder/krea2_text_encoder.pyindex 1a5f53db54..a1e8328ac8 100644--- a/invokeai/app/invocations/text_encoder/krea2_text_encoder.py+++ b/invokeai/app/invocations/text_encoder/krea2_text_encoder.py@@ -36,8 +36,9 @@ from invokeai.backend.stable_diffusion.diffusion.conditioning_data import ()from invokeai.backend.util.devices import TorchDevice-# The loader drops the Qwen3-VL visual tower: conditioning never executes it, so its weights would be-# dead resident bytes. An adapter can still carry layers for it -- a Krea-2 LoRA's encoder keys are+# The loader drops the Qwen3-VL visual tower from the text encoder: text-only encoding never runs it, and+# reference images run a separately loaded tower, so in the encoder its weights would be dead resident+# bytes. An adapter can still carry layers for it -- a Krea-2 LoRA's encoder keys are# whatever followed `text_encoder.`, and the converter does emit `lora_qwen3vl-visual.*` -- and those# layers now resolve to no module. Left to the patcher that is one "Failed to find module for LoRA# layer key" per layer per generation (~108 lines on the 4B, whose vision tower has 27 blocks),diff --git a/invokeai/backend/model_manager/configs/qwen3_vl_encoder.py b/invokeai/backend/model_manager/configs/qwen3_vl_encoder.pyindex 8d44eb46eb..40d347244f 100644--- a/invokeai/backend/model_manager/configs/qwen3_vl_encoder.py+++ b/invokeai/backend/model_manager/configs/qwen3_vl_encoder.py@@ -235,8 +235,9 @@ def _raise_if_qwen3_vl_mmproj(mod: ModelOnDisk) -> None:returnraise InvalidMatchError("this is the Qwen3-VL visual tower ('mmproj'), not a text encoder. Install the language tower "- "instead (e.g. 'Qwen3VL-4B-Instruct-Q4_K_M.gguf'); Krea-2 and Ideogram 4 condition on text only "- "and never use the visual tower."+ "instead (e.g. 'Qwen3VL-4B-Instruct-Q4_K_M.gguf'). GGUF encoders read text only; Krea-2 edit "+ "reference images need a Qwen3-VL encoder with its vision weights, such as the Krea-2 Diffusers "+ "model's encoder or a single-file Qwen3-VL checkpoint.")@@ -282,9 +283,10 @@ class Qwen3VLEncoder_GGUF_Config(Checkpoint_Config_Base, Config_Base):"""Configuration for a single-file GGUF Qwen3-VL encoder (llama.cpp, e.g.``Qwen3VL-4B-Instruct-Q4_K_M.gguf``).- llama.cpp splits Qwen3-VL across two files: the language tower -- all Krea-2 and Ideogram 4- condition on -- and a companion ``mmproj-*.gguf`` holding the visual tower. Only the language- tower is accepted here; the ``mmproj`` file is turned away with its own reason.+ llama.cpp splits Qwen3-VL across two files: the language tower -- all a text prompt needs -- and a+ companion ``mmproj-*.gguf`` holding the visual tower, which reads Krea-2 edit reference images.+ Only the language tower is accepted here; the ``mmproj`` file is turned away with its own reason,+ so a GGUF encoder encodes text only.Identified by the ``general.architecture`` metadata, which is the only honest discriminator: aQwen3-VL language tower is structurally indistinguishable from a text-only Qwen3 of the samediff --git a/invokeai/frontend/api/openapi.json b/invokeai/frontend/api/openapi.jsonindex 28fdd850ff..03dc9195c9 100644--- a/invokeai/frontend/api/openapi.json+++ b/invokeai/frontend/api/openapi.json@@ -94683,7 +94683,7 @@"cpu_only"],"title": "Qwen3VLEncoder_GGUF_Config",- "description": "Configuration for a single-file GGUF Qwen3-VL encoder (llama.cpp, e.g.\n``Qwen3VL-4B-Instruct-Q4_K_M.gguf``).\n\nllama.cpp splits Qwen3-VL across two files: the language tower -- all Krea-2 and Ideogram 4\ncondition on -- and a companion ``mmproj-*.gguf`` holding the visual tower. Only the language\ntower is accepted here; the ``mmproj`` file is turned away with its own reason.\n\nIdentified by the ``general.architecture`` metadata, which is the only honest discriminator: a\nQwen3-VL language tower is structurally indistinguishable from a text-only Qwen3 of the same\nsize (both 36 layers at hidden 2560 for the 4B), so a shape probe would accept a stock Qwen3\nGGUF as a Krea-2 encoder. That file loads without error and produces silently wrong\nconditioning, which is precisely the failure identification exists to prevent."+ "description": "Configuration for a single-file GGUF Qwen3-VL encoder (llama.cpp, e.g.\n``Qwen3VL-4B-Instruct-Q4_K_M.gguf``).\n\nllama.cpp splits Qwen3-VL across two files: the language tower -- all a text prompt needs -- and a\ncompanion ``mmproj-*.gguf`` holding the visual tower, which reads Krea-2 edit reference images.\nOnly the language tower is accepted here; the ``mmproj`` file is turned away with its own reason,\nso a GGUF encoder encodes text only.\n\nIdentified by the ``general.architecture`` metadata, which is the only honest discriminator: a\nQwen3-VL language tower is structurally indistinguishable from a text-only Qwen3 of the same\nsize (both 36 layers at hidden 2560 for the 4B), so a shape probe would accept a stock Qwen3\nGGUF as a Krea-2 encoder. That file loads without error and produces silently wrong\nconditioning, which is precisely the failure identification exists to prevent."},"Qwen3VLEncoder_Qwen3VLEncoder_Config": {"properties": {diff --git a/invokeai/frontend/api/schema.ts b/invokeai/frontend/api/schema.tsindex 671dc1c007..37d8b89fba 100644--- a/invokeai/frontend/api/schema.ts+++ b/invokeai/frontend/api/schema.ts@@ -40759,9 +40759,10 @@ export type components = {* @description Configuration for a single-file GGUF Qwen3-VL encoder (llama.cpp, e.g.* ``Qwen3VL-4B-Instruct-Q4_K_M.gguf``).*- * llama.cpp splits Qwen3-VL across two files: the language tower -- all Krea-2 and Ideogram 4- * condition on -- and a companion ``mmproj-*.gguf`` holding the visual tower. Only the language- * tower is accepted here; the ``mmproj`` file is turned away with its own reason.+ * llama.cpp splits Qwen3-VL across two files: the language tower -- all a text prompt needs -- and a+ * companion ``mmproj-*.gguf`` holding the visual tower, which reads Krea-2 edit reference images.+ * Only the language tower is accepted here; the ``mmproj`` file is turned away with its own reason,+ * so a GGUF encoder encodes text only.** Identified by the ``general.architecture`` metadata, which is the only honest discriminator: a* Qwen3-VL language tower is structurally indistinguishable from a text-only Qwen3 of the samediff --git a/tests/backend/model_manager/load/test_qwen3_vl_visual_tower.py b/tests/backend/model_manager/load/test_qwen3_vl_visual_tower.pyindex 55c6d116c7..2d377cb153 100644--- a/tests/backend/model_manager/load/test_qwen3_vl_visual_tower.py+++ b/tests/backend/model_manager/load/test_qwen3_vl_visual_tower.py@@ -1,9 +1,11 @@"""Dropping the Qwen3-VL visual tower on the safetensors load paths.Krea-2 and Ideogram 4 condition on the language tower's hidden states; `Qwen3VLModel.forward`-reaches `self.visual` only for `pixel_values`, which neither invocation passes, and Ideogram 4 does-not go through `forward` at all. The tower is therefore never executed, and dropping it takes-0.39-0.77 GiB off the 4B encoder depending on the container.+reaches `self.visual` only for `pixel_values`, which text-only encoding never passes, and Ideogram 4+does not go through `forward` at all. Krea-2 reference images do run the tower, but a separately+loaded one (the `VisionEncoder` submodel) attached to the encoder for that call. The encoder's own+tower is therefore never executed, and dropping it takes 0.39-0.77 GiB off the 4B encoder depending+on the container.These tests use a real (tiny) `Qwen3VLModel`, so what disappears is the architecture's actual visiontower rather than a stand-in. MiniMax H3 does run this tower and loads through