{"record":{"id":"1f40a24e73ab9f54","repo":"invoke-ai/InvokeAI","slug":"vae-vae-config-name-is-not-compatible-with-kre","errorCode":null,"errorMessage":"VAE '{vae_config.name}' is not compatible with Krea-2. Select a Qwen Image or Anima VAE.","messagePattern":"VAE '(.+?)' is not compatible with Krea-2\\. Select a Qwen Image or Anima VAE\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/krea2_model_loader.py","lineNumber":92,"sourceCode":"\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:\n            self._validate_diffusers_format(context, self.model, \"Krea-2\")\n            vae = self.model.model_copy(update={\"submodel_type\": SubModelType.VAE})\n\n        # Determine Qwen3-VL Encoder source.\n        if self.qwen3_vl_encoder_model is not None:\n            encoder_config = context.models.get_config(self.qwen3_vl_encoder_model)\n            if encoder_config.type is not ModelType.Qwen3VLEncoder:\n                raise ValueError(f\"Encoder '{encoder_config.name}' is not a Qwen3-VL encoder compatible with Krea-2.\")\n            tokenizer = self.qwen3_vl_encoder_model.model_copy(update={\"submodel_type\": SubModelType.Tokenizer})\n            text_encoder = self.qwen3_vl_encoder_model.model_copy(update={\"submodel_type\": SubModelType.TextEncoder})\n        else:\n            self._validate_diffusers_format(context, self.model, \"Krea-2\")\n            tokenizer = self.model.model_copy(update={\"submodel_type\": SubModelType.Tokenizer})\n            text_encoder = self.model.model_copy(update={\"submodel_type\": SubModelType.TextEncoder})","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/krea2_model_loader.py#L74-L110","documentation":"When a standalone VAE is supplied to Krea2ModelLoader, it must be a VAE-type model based on QwenImage or Anima; Krea-2 reuses those VAE architectures. Supplying any other VAE (wrong type or base) raises this ValueError during invoke().","triggerScenarios":"Setting Krea2ModelLoader.vae_model to a config whose type is not ModelType.VAE, or whose base is not QwenImage or Anima (e.g. an SDXL VAE or a non-VAE model record).","commonSituations":"Picking a VAE from an incompatible model family in the node selector; reusing a VAE from older InvokeAI workflows (SD1.5/SDXL); a VAE imported with the wrong base classification.","solutions":["Select a VAE whose base is QwenImage or Anima in the vae_model field.","Leave vae_model unset so the loader extracts the VAE from the Diffusers-format Krea-2 main model.","Re-import the intended VAE with the correct base type (QwenImage or Anima) in the model manager."],"exampleFix":"// before\nKrea2ModelLoader(model=krea2_main, vae_model=sdxl_vae)\n// after\nKrea2ModelLoader(model=krea2_main, vae_model=qwen_image_vae)  # or omit vae_model","handlingStrategy":"validation","validationCode":"if vae_field is not None:\n    cfg = context.models.get_config(vae_field)\n    if cfg.type is not ModelType.VAE or cfg.base not in (BaseModelType.QwenImage, BaseModelType.Anima):\n        raise ValueError(f\"VAE {cfg.name} incompatible with Krea-2\")","typeGuard":"from invokeai.backend.model_manager.config import BaseModelType, ModelType\n\ndef is_krea2_compatible_vae(cfg) -> bool:\n    return cfg.type is ModelType.VAE and cfg.base in (BaseModelType.QwenImage, BaseModelType.Anima)","tryCatchPattern":"try:\n    output = loader.invoke(context)\nexcept ValueError as e:\n    if \"not compatible with Krea-2\" in str(e) and \"VAE\" in str(e):\n        output = loader.model_copy(update={\"vae_model\": None}).invoke(context)\n    else:\n        raise","preventionTips":["Only pair Krea-2 with Qwen Image or Anima VAEs","Omit vae_model to inherit the main model's Diffusers-stored VAE","Verify VAE base type in the model manager before wiring nodes"],"tags":["invokeai","model-loading","vae","compatibility"],"backgroundTag":"incompatible-model-type","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}