{"record":{"id":"8d3fd2b3ce0c4c03","repo":"invoke-ai/InvokeAI","slug":"lora-lora-key-already-applied-to-low-noise-tra","errorCode":null,"errorMessage":"LoRA \"{lora_key}\" already applied to low-noise transformer list.","messagePattern":"LoRA \"(.+?)\" already applied to low-noise transformer list\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/wan_lora_loader.py","lineNumber":199,"sourceCode":"        lora_config = context.models.get_config(self.lora)\n        _assert_is_wan_lora(lora_config, lora_key)\n\n        output = WanLoRALoaderOutput()\n        if self.transformer is None:\n            return output\n\n        main_config = context.models.get_config(self.transformer.transformer)\n        _assert_lora_variant_matches_main(lora_config, main_config, lora_key)\n\n        lora_expert = getattr(lora_config, \"expert\", None)\n        to_primary, to_low_noise = _resolve_target(self.target, lora_expert)\n        to_primary, to_low_noise = _correct_inert_low_routing(context, main_config, lora_key, to_primary, to_low_noise)\n\n        # Reject duplicates on whichever list(s) we're about to append to.\n        if to_primary and any(item.lora.key == lora_key for item in self.transformer.loras):\n            raise ValueError(f'LoRA \"{lora_key}\" already applied to primary transformer list.')\n        if to_low_noise and any(item.lora.key == lora_key for item in self.transformer.loras_low_noise):\n            raise ValueError(f'LoRA \"{lora_key}\" already applied to low-noise transformer list.')\n\n        output.transformer = self.transformer.model_copy(deep=True)\n        new_lora = LoRAField(lora=self.lora, weight=self.weight)\n        if to_primary:\n            output.transformer.loras.append(new_lora)\n        if to_low_noise:\n            output.transformer.loras_low_noise.append(new_lora)\n\n        return output\n\n\n@invocation(\n    \"wan_lora_collection_loader\",\n    title=\"Apply LoRA Collection - Wan 2.2\",\n    tags=[\"lora\", \"model\", \"wan\"],\n    category=\"model\",\n    version=\"1.0.1\",\n    classification=Classification.Prototype,","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/wan_lora_loader.py#L181-L217","documentation":"Same duplicate-key invariant as the primary list, but checked against transformer.loras_low_noise (the A14B low-noise expert's LoRA list). Raised when routing sends the LoRA to the low-noise list and a LoRA with the same key is already there. Prevents double-counting the LoRA weight on the low-noise transformer.","triggerScenarios":"Applying a LoRA whose key is already in transformer.loras_low_noise with target='low' (or an untagged 'auto' LoRA that routes to low-noise); chaining loader nodes that both add the same LoRA to the low-noise list.","commonSituations":"A14B dual-expert workflows where two loader nodes include the same low-expert LoRA; re-running an edited workflow where the LoRA was already wired into the low-noise list; duplicated loader nodes.","solutions":["Remove the duplicate low-noise routing (change target or delete the redundant loader node).","Increase the existing entry's weight instead of adding a second entry.","Audit the chain feeding the transformer field to ensure each lora key is added once per list."],"exampleFix":"// before\ntransformer.loras_low_noise.append(LoRAField(lora=lora, weight=0.75))  # key already present -> ValueError\n// after: remove the duplicate or merge weights\ntransformer.loras_low_noise = [item for item in transformer.loras_low_noise if item.lora.key != lora.key]\ntransformer.loras_low_noise.append(LoRAField(lora=lora, weight=0.9))","handlingStrategy":"validation","validationCode":"if any(item.lora.key == lora.key for item in transformer.loras_low_noise):\n    skip_or_merge_weights()  # already on the low-noise expert","typeGuard":"def is_duplicate_low(transformer, lora_key: str) -> bool:\n    return any(item.lora.key == lora_key for item in transformer.loras_low_noise)","tryCatchPattern":"try:\n    out = loader.invoke(context)\nexcept ValueError as e:\n    if \"already applied to low-noise transformer list\" in str(e):\n        remove_duplicate_low_noise_entry()\n    else:\n        raise","preventionTips":["On A14B workflows, track which LoRAs target the low-noise expert separately from primary.","Route each LoRA to one list per run; merge weight changes into the existing entry.","Check loras_low_noise before wiring another loader targeting 'low'."],"tags":["invokeai","lora","duplicate","low-noise"],"backgroundTag":"duplicate-lora-application","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}