{"record":{"id":"b8420b3d10df0ba3","repo":"invoke-ai/InvokeAI","slug":"both-selected-models-are-tagged-as-the-primary-ex","errorCode":null,"errorMessage":"Both selected models are tagged as the {primary_expert}-noise expert ('{main_config.name}' and '{low_config.name}'). A Wan A14B expert pair must contain one high and one low expert.","messagePattern":"Both selected models are tagged as the (.+?)-noise expert \\('(.+?)' and '(.+?)'\\)\\. A Wan A14B expert pair must contain one high and one low expert\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/wan_model_loader.py","lineNumber":197,"sourceCode":"                    )\n                low_id = self.transformer_low_noise_model.model_copy(update={\"submodel_type\": SubModelType.Transformer})\n                low_expert = getattr(low_config, \"expert\", \"none\")\n\n                if getattr(low_config, \"variant\", None) != main_variant:\n                    low_variant = getattr(low_config, \"variant\", None)\n                    raise ValueError(\n                        \"The high-noise and low-noise models must use the same Wan variant, but \"\n                        f\"'{main_config.name}' is {main_variant.value} and '{low_config.name}' is \"\n                        f\"{getattr(low_variant, 'value', low_variant)}.\"\n                    )\n\n                # The expert tag is a filename heuristic, so 'none' (untagged) is common on\n                # community finetunes. The wiring itself is explicit user intent — main slot\n                # = high, low-noise slot = low — so an untagged file is taken at its wired\n                # position (or inferred as the complement of its tagged partner). Only a\n                # genuine conflict, both files claiming the *same* expert, is an error.\n                if primary_expert == low_expert != \"none\":\n                    raise ValueError(\n                        f\"Both selected models are tagged as the {primary_expert}-noise expert \"\n                        f\"('{main_config.name}' and '{low_config.name}'). A Wan A14B expert pair \"\n                        \"must contain one high and one low expert.\"\n                    )\n                if primary_expert == \"none\" and low_expert == \"none\":\n                    context.logger.warning(\n                        \"Neither Wan A14B filename identifies its expert, so 'Transformer' is assumed to \"\n                        \"be the high-noise expert and 'Transformer (Low Noise)' the low-noise expert. If the \"\n                        \"output looks wrong, swap the two models.\"\n                    )\n\n                # Make sure 'transformer' is the high-noise expert and\n                # 'transformer_low_noise' is the low-noise expert. If the user\n                # accidentally swapped them, swap back.\n                if primary_expert == \"low\" or low_expert == \"high\":\n                    transformer = low_id\n                    transformer_low_noise = primary_id\n                    # The swap overrides the wiring on the strength of a","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/wan_model_loader.py#L179-L215","documentation":"WanModelLoaderInvocation infers each expert's role from an 'expert' filename tag ('high'/'low'). If both the main and low-noise models are tagged as the same expert (primary_expert == low_expert != 'none'), the pair cannot contain one high and one low expert, so invoke raises this ValueError. Untagged files ('none') are tolerated with a warning, since the wiring itself declares intent.","triggerScenarios":"Selecting two files that both carry e.g. 'high_noise' in their filenames as the main and low-noise models (e.g., wan2.2_i2v_high_noise_bf16.safetensors in both slots); misnamed community files whose expert tags collide.","commonSituations":"Users downloading only the high-noise expert and wiring it twice under different filenames; community finetunes shipped with duplicated/incorrect expert naming; picking two files from the same expert directory.","solutions":["Download and select the complementary low-noise expert file (its filename should carry the 'low' expert tag).","Rename one file so its filename encodes the correct expert tag (e.g., include 'low_noise'), then rescan in the model manager.","Verify the two selected files are genuinely the high and low experts of the same A14B release."],"exampleFix":"// before\nprimary_expert = \"high\"  # from main model filename\nlow_expert = \"high\"      # same tag on both files -> ValueError\n// after: pair high with low\ntransformer = wan22_a14b_high_noise.safetensors\ntransformer_low_noise_model = wan22_a14b_low_noise.safetensors","handlingStrategy":"validation","validationCode":"def expert_tag(config): return getattr(config, \"expert\", \"none\")\nif expert_tag(main_config) == expert_tag(low_config) != \"none\":\n    raise ValueError(\"Both files tagged as the same expert; pair one high with one low\")","typeGuard":"def is_valid_expert_pair(main_config, low_config) -> bool:\n    tags = {getattr(main_config, \"expert\", \"none\"), getattr(low_config, \"expert\", \"none\")}\n    return \"none\" in tags or tags == {\"high\", \"low\"}","tryCatchPattern":"try:\n    out = wan_model_loader.invoke(context)\nexcept ValueError as e:\n    if \"tagged as the\" in str(e) and \"expert\" in str(e):\n        select_complementary_low_expert_file()\n    else:\n        raise","preventionTips":["Keep expert role in filenames ('high_noise'/'low_noise') so the heuristic tags resolve.","Download both experts from the same A14B release rather than mixing sources.","Check the model config's 'expert' tag for both slots before wiring dual-expert graphs."],"tags":["invokeai","wan","model-loader","expert-tag","a14b"],"backgroundTag":"expert-tag-conflict","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}