{"record":{"id":"803d0c57ef54016a","repo":"invoke-ai/InvokeAI","slug":"lora-lora-lora-key-is-for-lora-lora-base-valu","errorCode":null,"errorMessage":"LoRA '{lora.lora.key}' is for {lora.lora.base.value if lora.lora.base else 'unknown'} models, not Anima models. Ensure you are using an Anima compatible LoRA.","messagePattern":"LoRA '(.+?)' is for (.+?) models, not Anima models\\. Ensure you are using an Anima compatible LoRA\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/anima_lora_loader.py","lineNumber":153,"sourceCode":"        added_loras: list[str] = []\n\n        if self.transformer is not None:\n            output.transformer = self.transformer.model_copy(deep=True)\n\n        if self.qwen3_encoder is not None:\n            output.qwen3_encoder = self.qwen3_encoder.model_copy(deep=True)\n\n        for lora in loras:\n            if lora is None:\n                continue\n            if lora.lora.key in added_loras:\n                continue\n\n            if not context.models.exists(lora.lora.key):\n                raise ValueError(f\"Unknown lora: {lora.lora.key}!\")\n\n            if lora.lora.base is not BaseModelType.Anima:\n                raise ValueError(\n                    f\"LoRA '{lora.lora.key}' is for {lora.lora.base.value if lora.lora.base else 'unknown'} models, \"\n                    \"not Anima models. Ensure you are using an Anima compatible LoRA.\"\n                )\n\n            added_loras.append(lora.lora.key)\n\n            if self.transformer is not None and output.transformer is not None:\n                output.transformer.loras.append(lora)\n\n            if self.qwen3_encoder is not None and output.qwen3_encoder is not None:\n                output.qwen3_encoder.loras.append(lora)\n\n        return output\n","sourceCodeStart":135,"sourceCodeEnd":167,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/anima_lora_loader.py#L135-L167","documentation":"The loader validates that each LoRA's base model type is BaseModelType.Anima. LoRAs trained for other architectures (SDXL, Flux, SD1.x, etc.) have incompatible weight shapes and target modules, so applying them would corrupt the model. The error names the LoRA's actual base type and asks for an Anima-compatible LoRA.","triggerScenarios":"Invoking AnimaLoRALoader with any LoRA in self.transformer.loras whose lora.lora.base is not BaseModelType.Anima (None base also triggers the 'unknown' variant).","commonSituations":"Dragging an SDXL/Flux LoRA from a shared workflow into an Anima pipeline; downloading a LoRA for the wrong architecture from Civitai; a LoRA file with missing/incorrect metadata so its base type resolves to None.","solutions":["Replace the LoRA with one explicitly trained for Anima models.","Check the LoRA's base model metadata in the model manager and correct it if mislabeled.","Remove the incompatible LoRA from the workflow before running."],"exampleFix":"// before\nlora = LoraSelector(lora=sdxl_lora_key, weight=0.8)  # base=SDXL\n// after\nlora = LoraSelector(lora=anima_lora_key, weight=0.8)  # base=Anima","handlingStrategy":"validation","validationCode":"from invokeai.backend.model_manager.config import BaseModelType\nfor lora in loras:\n    if lora.lora.base is not BaseModelType.Anima:\n        print(f\"Skip {lora.lora.key}: base={lora.lora.base}\")","typeGuard":"def is_anima_lora(lora) -> bool:\n    from invokeai.backend.model_manager.config import BaseModelType\n    return lora.lora.base is BaseModelType.Anima","tryCatchPattern":"try:\n    output = lora_loader.invoke(context)\nexcept ValueError as e:\n    if \"not Anima models\" in str(e):\n        swap_to_anima_lora(e)\n    else:\n        raise","preventionTips":["Only download LoRAs explicitly labeled for Anima; check base model metadata before use.","Never reuse LoRA selector nodes across pipelines with different base model types.","Verify LoRA metadata after import; a None base type is a red flag."],"tags":["lora","model-compatibility","invokeai","base-model-type"],"backgroundTag":"incompatible-model-architecture","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}