{"record":{"id":"0816fd70301b8af4","repo":"invoke-ai/InvokeAI","slug":"model-main-config-name-is-not-a-krea-2-main-mo","errorCode":null,"errorMessage":"Model '{main_config.name}' is not a Krea-2 main model. Select a Krea-2 transformer model.","messagePattern":"Model '(.+?)' is not a Krea-2 main model\\. Select a Krea-2 transformer model\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/krea2_model_loader.py","lineNumber":78,"sourceCode":"        input=Input.Direct,\n        ui_model_base=[BaseModelType.QwenImage, BaseModelType.Anima],\n        ui_model_type=ModelType.VAE,\n        title=\"VAE\",\n    )\n\n    qwen3_vl_encoder_model: Optional[ModelIdentifierField] = InputField(\n        default=None,\n        description=\"Standalone Qwen3-VL Encoder model. \"\n        \"If not provided, the encoder is loaded from the Krea-2 (diffusers) model.\",\n        input=Input.Direct,\n        ui_model_type=ModelType.Qwen3VLEncoder,\n        title=\"Qwen3-VL Encoder\",\n    )\n\n    def invoke(self, context: InvocationContext) -> Krea2ModelLoaderOutput:\n        main_config = context.models.get_config(self.model)\n        if main_config.base is not BaseModelType.Krea2 or main_config.type is not ModelType.Main:\n            raise ValueError(\n                f\"Model '{main_config.name}' is not a Krea-2 main model. Select a Krea-2 transformer model.\"\n            )\n\n        # Transformer always comes from the main model.\n        transformer = self.model.model_copy(update={\"submodel_type\": SubModelType.Transformer})\n\n        # Determine VAE source.\n        if self.vae_model is not None:\n            vae_config = context.models.get_config(self.vae_model)\n            if vae_config.type is not ModelType.VAE or vae_config.base not in (\n                BaseModelType.QwenImage,\n                BaseModelType.Anima,\n            ):\n                raise ValueError(\n                    f\"VAE '{vae_config.name}' is not compatible with Krea-2. Select a Qwen Image or Anima VAE.\"\n                )\n            vae = self.vae_model.model_copy(update={\"submodel_type\": SubModelType.VAE})\n        else:","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/krea2_model_loader.py#L60-L96","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"// before\nloader = Krea2ModelLoader(model=qwen_image_main_model, ...)\n// after\nloader = Krea2ModelLoader(model=krea2_main_model, ...)  # base=Krea2, type=Main","handlingStrategy":"validation","validationCode":"cfg = context.models.get_config(model_field)\nif cfg.base is not BaseModelType.Krea2 or cfg.type is not ModelType.Main:\n    raise ValueError(f\"{cfg.name} is not a Krea-2 main model\")","typeGuard":"from invokeai.backend.model_manager.config import BaseModelType, ModelType\n\ndef is_krea2_main(cfg) -> bool:\n    return cfg.base is BaseModelType.Krea2 and cfg.type is ModelType.Main","tryCatchPattern":"try:\n    output = loader.invoke(context)\nexcept ValueError as e:\n    if \"not a Krea-2 main model\" in str(e):\n        output = pick_default_krea2_main(context).and_reload()\n    else:\n        raise","preventionTips":["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"],"tags":["invokeai","model-loading","model-type","configuration"],"backgroundTag":"incompatible-model-type","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}