{"record":{"id":"bf4b8d43cdf98da1","repo":"invoke-ai/InvokeAI","slug":"lora-lora-lora-key-is-for-lora-lora-base-valu-bf4b8d","errorCode":null,"errorMessage":"LoRA '{lora.lora.key}' is for {lora.lora.base.value if lora.lora.base else 'unknown'} models, not FLUX models. Ensure you are using a FLUX compatible LoRA.","messagePattern":"LoRA '(.+?)' is for (.+?) models, not FLUX models\\. Ensure you are using a FLUX compatible LoRA\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/flux_lora_loader.py","lineNumber":170,"sourceCode":"            output.transformer = self.transformer.model_copy(deep=True)\n\n        if self.clip is not None:\n            output.clip = self.clip.model_copy(deep=True)\n\n        if self.t5_encoder is not None:\n            output.t5_encoder = self.t5_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 Exception(f\"Unknown lora: {lora.lora.key}!\")\n\n            if lora.lora.base is not BaseModelType.Flux:\n                raise ValueError(\n                    f\"LoRA '{lora.lora.key}' is for {lora.lora.base.value if lora.lora.base else 'unknown'} models, \"\n                    \"not FLUX models. Ensure you are using a FLUX 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.clip is not None and output.clip is not None:\n                output.clip.loras.append(lora)\n\n            if self.t5_encoder is not None and output.t5_encoder is not None:\n                output.t5_encoder.loras.append(lora)\n\n        return output\n","sourceCodeStart":152,"sourceCodeEnd":187,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/flux_lora_loader.py#L152-L187","documentation":"The loader validates that every collected LoRA has base model type BaseModelType.Flux. If the LoRA was trained/registered for another architecture (SD1, SDXL, etc.) it raises ValueError explaining the LoRA is not FLUX compatible. Cross-architecture LoRAs cannot be applied to a FLUX transformer.","triggerScenarios":"invoke() collects a LoRA whose lora.lora.base is not BaseModelType.Flux (e.g., an SDXL LoRA node feeding a FLUX graph, or a LoRA record with a null/unknown base).","commonSituations":"Downloading an SD1.5/SDXL LoRA and wiring it into a FLUX workflow; a malformed model record where base type is missing; mixing pipelines from different model families in one graph.","solutions":["Use a FLUX-specific LoRA trained for the FLUX architecture","Check the LoRA's base model type in the Model Manager before adding it to a FLUX graph","Remove the incompatible LoRA node from the FLUX workflow","Re-import the LoRA ensuring the correct base model type is detected/configured"],"exampleFix":"// before\nlora=ModelIdentifierField(key='sdxl_detail_lora')  # base=SDXL\n// after\nlora=ModelIdentifierField(key='flux_detail_lora')  # base=Flux","handlingStrategy":"validation","validationCode":"cfg = context.models.get_config(lora_key)\nif cfg.base is not BaseModelType.Flux:\n    raise ValueError(f\"{lora_key} is {cfg.base}, not Flux\")","typeGuard":"def is_flux_lora(config) -> bool:\n    return config.base is BaseModelType.Flux","tryCatchPattern":"try:\n    output = collector.invoke(context)\nexcept ValueError as e:\n    if 'not FLUX models' in str(e):\n        # swap in a FLUX-compatible LoRA\n        pass\n    else:\n        raise","preventionTips":["Check a LoRA's base model type before adding it to a FLUX graph","Only download LoRAs explicitly labeled FLUX","Verify base type after model import, especially for LoRAs from mixed collections"],"tags":["lora","model-compatibility","flux","wrong-architecture","invokeai"],"backgroundTag":"incompatible-model-architecture","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}