invoke-ai/InvokeAI · error · ValueError
Model '{main_config.name}' is not a Krea-2 main model. Selec
Error message
Model '{main_config.name}' is not a Krea-2 main model. Select a Krea-2 transformer model. What it means
Krea2ModelLoader.invoke() requires the selected main model to have base model type Krea2 and type Main. Any other selection (wrong base family or non-main submodel) is rejected with this ValueError because the loader derives the Krea-2 transformer from the main model config.
Source
Thrown at invokeai/app/invocations/krea2_model_loader.py:78
input=Input.Direct,
ui_model_base=[BaseModelType.QwenImage, BaseModelType.Anima],
ui_model_type=ModelType.VAE,
title="VAE",
)
qwen3_vl_encoder_model: Optional[ModelIdentifierField] = InputField(
default=None,
description="Standalone Qwen3-VL Encoder model. "
"If not provided, the encoder is loaded from the Krea-2 (diffusers) model.",
input=Input.Direct,
ui_model_type=ModelType.Qwen3VLEncoder,
title="Qwen3-VL Encoder",
)
def invoke(self, context: InvocationContext) -> Krea2ModelLoaderOutput:
main_config = context.models.get_config(self.model)
if main_config.base is not BaseModelType.Krea2 or main_config.type is not ModelType.Main:
raise ValueError(
f"Model '{main_config.name}' is not a Krea-2 main model. Select a Krea-2 transformer model."
)
# Transformer always comes from the main model.
transformer = self.model.model_copy(update={"submodel_type": SubModelType.Transformer})
# Determine VAE source.
if self.vae_model is not None:
vae_config = context.models.get_config(self.vae_model)
if vae_config.type is not ModelType.VAE or vae_config.base not in (
BaseModelType.QwenImage,
BaseModelType.Anima,
):
raise ValueError(
f"VAE '{vae_config.name}' is not compatible with Krea-2. Select a Qwen Image or Anima VAE."
)
vae = self.vae_model.model_copy(update={"submodel_type": SubModelType.VAE})
else:View on GitHub (pinned to 0b6a024f2f)
Solutions
- In the model manager, install/select a main model whose base is Krea2 and type is Main, then reference that in the loader node.
- Check the model record: convert or re-import the checkpoint with base=Krea2 if it was misclassified.
- If you meant a different architecture, use the matching loader invocation (e.g. Qwen Image or Flux loader) instead of Krea2ModelLoader.
Example fix
// before loader = Krea2ModelLoader(model=qwen_image_main_model, ...) // after loader = Krea2ModelLoader(model=krea2_main_model, ...) # base=Krea2, type=Main
Defensive patterns
Strategy: validation
Validate before calling
cfg = context.models.get_config(model_field)
if cfg.base is not BaseModelType.Krea2 or cfg.type is not ModelType.Main:
raise ValueError(f"{cfg.name} is not a Krea-2 main model") Type guard
from invokeai.backend.model_manager.config import BaseModelType, ModelType
def is_krea2_main(cfg) -> bool:
return cfg.base is BaseModelType.Krea2 and cfg.type is ModelType.Main Try / catch
try:
output = loader.invoke(context)
except ValueError as e:
if "not a Krea-2 main model" in str(e):
output = pick_default_krea2_main(context).and_reload()
else:
raise Prevention
- Reference only top-level main model records in loader nodes, never submodel identifiers
- Filter node model dropdowns by base=Krea2, type=Main
- Re-verify model classifications after bulk imports or migrations
When it happens
Trigger: Passing a ModelIdentifierField to Krea2ModelLoader.model whose config has base != BaseModelType.Krea2, or type != ModelType.Main (e.g. a Qwen Image, SDXL, or Flux main model, or a VAE/encoder submodel reference).
Common situations: Selecting a model installed under a different base family in the model manager; pointing the loader at a submodel (transformer/VAE) record instead of the main model; stale model lists after re-install or base-type conversion.
Related errors
- LoRA '{lora.lora.key}' has conflicting weights on the transf
- Encoder '{encoder_config.name}' is not a Qwen3-VL encoder co
- Model '{model_key}' is not a TextLLM model (got {model_confi
- Model '{model_key}' is not a LLaVA OneVision model (got {mod
- VAE '{vae_config.name}' is not compatible with Krea-2. Selec
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/0816fd70301b8af4.
Report an issue: GitHub.