{"record":{"id":"359ae445565ceecc","repo":"invoke-ai/InvokeAI","slug":"model-looks-like-control-lora","errorCode":null,"errorMessage":"model looks like Control LoRA","messagePattern":"model looks like Control LoRA","errorType":"exception","errorClass":"NotAMatchError","httpStatus":null,"severity":"warning","filePath":"invokeai/backend/model_manager/configs/lora.py","lineNumber":599,"sourceCode":"\n        cls._validate_base(mod)\n\n        return cls(**override_fields)\n\n    @classmethod\n    def _validate_base(cls, mod: ModelOnDisk) -> None:\n        \"\"\"Raise `NotAMatch` if the model base does not match this config class.\"\"\"\n        expected_base = cls.model_fields[\"base\"].default\n        recognized_base = cls._get_base_or_raise(mod)\n        if expected_base is not recognized_base:\n            raise NotAMatchError(f\"base is {recognized_base}, not {expected_base}\")\n\n    @classmethod\n    def _validate_looks_like_lora(cls, mod: ModelOnDisk) -> None:\n        # First rule out ControlLoRA\n        flux_format = _get_flux_lora_format(mod)\n        if flux_format in [FluxLoRAFormat.Control]:\n            raise NotAMatchError(\"model looks like Control LoRA\")\n\n        # If it's a recognized Flux LoRA format (Kohya, Diffusers, OneTrainer, AIToolkit, XLabs, etc.),\n        # it's valid and we skip the heuristic check\n        if flux_format is not None:\n            return\n\n        # Note: Existence of these key prefixes/suffixes does not guarantee that this is a LoRA.\n        # Some main models have these keys, likely due to the creator merging in a LoRA.\n        has_key_with_lora_prefix = state_dict_has_any_keys_starting_with(\n            mod.load_state_dict(),\n            {\n                \"lora_te_\",\n                \"lora_unet_\",\n                \"lora_te1_\",\n                \"lora_te2_\",\n                \"lora_transformer_\",\n            },\n        )","sourceCodeStart":581,"sourceCodeEnd":617,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/backend/model_manager/configs/lora.py#L581-L617","documentation":"`_validate_looks_like_lora` first rules out ControlLoRA weights: if `_get_flux_lora_format` identifies the file as `FluxLoRAFormat.Control`, the file is a Control LoRA, not a regular LoRA, and this config class raises `NotAMatchError`. Control LoRAs need to be imported as ControlNet-style models rather than standard LoRAs.","triggerScenarios":"`from_model_on_disk` probing a Flux LoRA file whose key structure matches the Control LoRA format (e.g. keys like `lora_controlnet...` / control-specific patterns recognized by `_get_flux_lora_format`).","commonSituations":"Autoimporting a folder that contains Flux Control LoRA weights; downloading a 'lora' from a model hub that is actually a ControlLoRA; expecting control-style conditioning to work via the LoRA pipeline.","solutions":["Import the model as a Control LoRA / ControlNet-style model rather than a standard LoRA","Check the model's documentation/repo to confirm its type before import","If it is genuinely a normal LoRA, re-export it with a non-Control key format (Kohya/diffusers)","Upgrade InvokeAI if support for Control LoRA as a distinct model type is needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from invokeai.backend.model_manager.configs.lora import _get_flux_lora_format\nfrom invokeai.backend.model_manager.metadata import FluxLoRAFormat\nfmt = _get_flux_lora_format(mod)\nif fmt == FluxLoRAFormat.Control:\n    print(\"import as Control LoRA, not standard LoRA\")","typeGuard":"def is_control_lora(mod) -> bool:\n    from invokeai.backend.model_manager.metadata import FluxLoRAFormat\n    return _get_flux_lora_format(mod) == FluxLoRAFormat.Control","tryCatchPattern":"try:\n    cfg = LoRAFluxConfig.from_model_on_disk(mod)\nexcept NotAMatchError as e:\n    if \"Control LoRA\" in str(e):\n        import_as_controlnet(mod)","preventionTips":["Verify model type on the download page before importing","Keep Control LoRAs in a separate import folder","Scan keys for control patterns before bulk autoimport"],"tags":["lora","control-lora","flux","not-a-match"],"backgroundTag":"control-lora-misclassified","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}