invoke-ai/InvokeAI · error · ValueError
To extract the VAE and Qwen3-VL encoder, the {model_name} mo
Error message
To extract the VAE and Qwen3-VL encoder, the {model_name} model must be in Diffusers format. The selected model '{config.name}' is in {config.format.value} format — provide a standalone VAE and Qwen3-VL Encoder instead. What it means
When no standalone VAE or Qwen3-VL encoder is provided, Krea2ModelLoader extracts them as submodels of the main model, which only works if the main model is stored in Diffusers format. Single-file/checkpoint formats cannot yield these submodels, so _validate_diffusers_format raises this ValueError.
Source
Thrown at invokeai/app/invocations/krea2_model_loader.py:124
text_encoder = self.qwen3_vl_encoder_model.model_copy(update={"submodel_type": SubModelType.TextEncoder})
else:
self._validate_diffusers_format(context, self.model, "Krea-2")
tokenizer = self.model.model_copy(update={"submodel_type": SubModelType.Tokenizer})
text_encoder = self.model.model_copy(update={"submodel_type": SubModelType.TextEncoder})
return Krea2ModelLoaderOutput(
transformer=TransformerField(transformer=transformer, loras=[]),
qwen3_vl_encoder=Qwen3VLEncoderField(tokenizer=tokenizer, text_encoder=text_encoder, loras=[]),
vae=VAEField(vae=vae),
)
def _validate_diffusers_format(
self, context: InvocationContext, model: ModelIdentifierField, model_name: str
) -> None:
"""Validate that a model is in Diffusers format (required to extract VAE / encoder submodels)."""
config = context.models.get_config(model)
if config.format != ModelFormat.Diffusers:
raise ValueError(
f"To extract the VAE and Qwen3-VL encoder, the {model_name} model must be in Diffusers format. "
f"The selected model '{config.name}' is in {config.format.value} format — provide a standalone "
"VAE and Qwen3-VL Encoder instead."
)
View on GitHub (pinned to 0b6a024f2f)
Solutions
- Provide standalone VAE and Qwen3-VL encoder models in the vae_model and qwen3_vl_encoder_model fields.
- Convert the main model to Diffusers format (re-import from a full Diffusers repo or use the model manager's convert action) and keep submodel extraction.
- Download the Diffusers-format variant of the Krea-2 model and install it in place of the checkpoint.
Example fix
// before Krea2ModelLoader(model=krea2_single_file_checkpoint) # no vae/encoder given // after Krea2ModelLoader(model=krea2_single_file_checkpoint, vae_model=qwen_image_vae, qwen3_vl_encoder_model=qwen3_vl_encoder)
Defensive patterns
Strategy: validation
Validate before calling
main_cfg = context.models.get_config(model_field)
needs_extraction = vae_field is None or encoder_field is None
if needs_extraction and main_cfg.format is not ModelFormat.Diffusers:
raise ValueError(f"{main_cfg.name} must be Diffusers format to extract VAE/encoder") Type guard
from invokeai.backend.model_manager.config import ModelFormat
def supports_submodel_extraction(cfg) -> bool:
return cfg.format is ModelFormat.Diffusers Try / catch
try:
output = loader.invoke(context)
except ValueError as e:
if "must be in Diffusers format" in str(e):
output = loader.model_copy(update={
"vae_model": default_qwen_vae,
"qwen3_vl_encoder_model": default_qwen3vl_encoder,
}).invoke(context)
else:
raise Prevention
- Install Krea-2 models in Diffusers format so submodel extraction always works
- Keep standalone VAE and Qwen3-VL encoder models registered as fallbacks
- Check config.format before omitting vae_model/encoder fields in generated workflows
When it happens
Trigger: Calling invoke() (via _validate_diffusers_format) with vae_model unset and/or qwen3_vl_encoder_model unset while the main model config.format is not ModelFormat.Diffusers (e.g. a single-file safetensors/checkpoint Krea-2 model).
Common situations: Using a single-file Krea-2 checkpoint download without converting to Diffusers layout; users who downloaded compact checkpoint versions instead of full Diffusers repos; older installed models predating Diffusers-format import.
Related errors
- The {model_name} model must be a Diffusers format model. The
- The {model_name} model must be a Diffusers-style FLUX.2 pipe
- CheckpointConfigBase is not implemented for Qwen Image Edit
- LoRA '{lora.lora.key}' has conflicting weights on the transf
- Model '{main_config.name}' is not a Krea-2 main model. Selec
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/5187245e25e6196c.
Report an issue: GitHub.