{"record":{"id":"1fe19c3917e1c7d2","repo":"invoke-ai/InvokeAI","slug":"wan-a14b-gguf-filename-or-metadata-must-identify-t","errorCode":null,"errorMessage":"Wan A14B GGUF filename or metadata must identify the model as Wan 2.2","messagePattern":"Wan A14B GGUF filename or metadata must identify the model as Wan 2\\.2","errorType":"exception","errorClass":"NotAMatchError","httpStatus":null,"severity":"error","filePath":"invokeai/backend/model_manager/configs/main.py","lineNumber":2229,"sourceCode":"            raise NotAMatchError(unsupported_reason)\n        gguf_name = mod.metadata().get(\"general.name\", \"\")\n        normalized_identity = \"\".join(\n            character for character in f\"{mod.path.stem} {gguf_name}\".lower() if character.isalnum()\n        )\n        if \"wan21\" in normalized_identity:\n            raise NotAMatchError(\"Wan 2.1 GGUF models are not supported by the Wan 2.2 loader\")\n        # A misnamed Wan 2.1 GGUF slips past the name check above; the architectural\n        # markers don't care what the file is called.\n        wan_2_1_reason = _find_wan_2_1_marker(sd)\n        if wan_2_1_reason is not None:\n            raise NotAMatchError(f\"Wan 2.1 GGUF models are not supported by the Wan 2.2 loader: {wan_2_1_reason}\")\n\n        explicit_variant = override_fields.pop(\"variant\", None)\n        variant = explicit_variant or _detect_wan_variant_from_state_dict(sd)\n        if variant is None:\n            raise NotAMatchError(\"could not determine Wan variant from state dict\")\n        if variant in (WanVariantType.T2V_A14B, WanVariantType.I2V_A14B) and \"wan22\" not in normalized_identity:\n            raise NotAMatchError(\"Wan A14B GGUF filename or metadata must identify the model as Wan 2.2\")\n\n        expert = _resolve_wan_expert(mod, override_fields, variant)\n\n        return cls(**override_fields, variant=variant, expert=expert)\n\n\nclass Main_Checkpoint_Wan_Config(Checkpoint_Config_Base, Main_Config_Base, Config_Base):\n    \"\"\"Model config for single-file Wan 2.2 transformer checkpoints (safetensors).\n\n    This is the format the community ships on CivitAI and in ComfyUI-oriented\n    Hugging Face repos: one ``.safetensors`` per transformer, in either the native\n    upstream key layout or the diffusers one, optionally under a\n    ``model.diffusion_model.`` prefix, and optionally ComfyUI ``fp8_scaled``\n    quantized. The loader normalises all of those.\n\n    As with GGUF, A14B's MoE arrives as two files (one per expert); ``expert``\n    records which one this is so the Wan model loader invocation can pair them.\n    TI2V-5B is single-transformer and stores ``expert='none'``.","sourceCodeStart":2211,"sourceCodeEnd":2247,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/backend/model_manager/configs/main.py#L2211-L2247","documentation":"Raised when the detected Wan variant is an A14B MoE model (T2V_A14B or I2V_A14B) but 'wan22' is absent from the normalized identity string built from the filename stem plus GGUF general.name metadata. A14B GGUFs must self-identify as Wan 2.2 because Wan 2.1 also ships A14B architectures, and the loader must not mix 2.1 expert files into a 2.2 setup.","triggerScenarios":"Importing a Wan A14B GGUF whose filename and metadata don't mention wan22 — e.g. plain 'high-noise-Q4_K_M.gguf' or a name reading just 'wan-t2v-14b'; files renamed aggressively for download mirrors.","commonSituations":"Stripping original names when organizing model folders; sites that rename files to SEO slugs; metadata-stripped GGUF repacks.","solutions":["Rename the file to include 'wan2.2' (e.g. Wan2.2-I2V-A14B-high-noise-Q4_K_M.gguf) and rescan","If the GGUF metadata is missing general.name, prefer fixing the filename — the metadata only complements it","Confirm the model really is Wan 2.2; if it is actually a renamed 2.1 A14B, the architectural check may catch it and the file is unusable regardless"],"exampleFix":"// before\n# mv high-noise-Q4_K_M.gguf autoimport/main/\n// after\n# mv high-noise-Q4_K_M.gguf autoimport/main/Wan2.2-I2V-A14B-high-noise-Q4_K_M.gguf && rescan","handlingStrategy":"validation","validationCode":"identity = ''.join(c for c in (path.stem + gguf_general_name).lower() if c.isalnum())\nif 'a14b' in identity and 'wan22' not in identity:\n    print(f'{path.name}: rename to include wan2.2 (and which expert) before importing')","typeGuard":null,"tryCatchPattern":"try:\n    import_model(path)\nexcept NotAMatchError as e:\n    if 'must identify the model as Wan 2.2' in str(e):\n        new = path.with_name('Wan2.2-' + path.name)\n        path.rename(new)\n        import_model(new)\n    else:\n        raise","preventionTips":["Keep original publisher filenames (they encode wan2.2 + expert info)","Never strip names to SEO/short slugs for model folders","When repacking GGUFs, preserve general.name metadata"],"tags":["model-manager","gguf","wan","naming-convention"],"backgroundTag":"model-filename-naming-convention","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}