{"record":{"id":"0658d9f492b3072a","repo":"invoke-ai/InvokeAI","slug":"wan-2-1-gguf-models-are-not-supported-by-the-wan-2","errorCode":null,"errorMessage":"Wan 2.1 GGUF models are not supported by the Wan 2.2 loader","messagePattern":"Wan 2\\.1 GGUF models are not supported by the Wan 2\\.2 loader","errorType":"exception","errorClass":"NotAMatchError","httpStatus":null,"severity":"error","filePath":"invokeai/backend/model_manager/configs/main.py","lineNumber":2217,"sourceCode":"\n        if not _has_ggml_tensors(sd):\n            raise NotAMatchError(\"state dict does not look like GGUF quantized\")\n        if not _has_wan_keys(sd):\n            raise NotAMatchError(\"state dict does not look like a Wan transformer\")\n        if not _has_wan_transformer_block_weights(sd):\n            raise NotAMatchError(\n                \"state dict has no undecorated transformer block weights — it looks like a Wan LoRA \"\n                \"or adapter rather than a full transformer\"\n            )\n        unsupported_reason = _find_unsupported_wan_variant_marker(sd)\n        if unsupported_reason is not None:\n            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","sourceCodeStart":2199,"sourceCodeEnd":2235,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/backend/model_manager/configs/main.py#L2199-L2235","documentation":"Raised by Main_GGUF_Wan_Config when the normalized identity (lowercased alphanumerics of the filename stem plus GGUF general.name metadata) contains 'wan21'. Wan 2.1 GGUF transformers are incompatible with the Wan 2.2 loader, so they are rejected explicitly by name before deeper architectural checks.","triggerScenarios":"Importing a Wan2.1 T2V/I2V/FLF2V GGUF (e.g. Wan2.1-T2V-14B-Q4_K_M.gguf) into InvokeAI; a filename like Wan2.1... or metadata general.name like 'Wan 2.1' triggers the normalized-identity substring match.","commonSituations":"Following older tutorials/HF links for Wan2.1 GGUFs while running a Wan-2.2-only InvokeAI version; autoimport folders that accumulated Wan 2.1 downloads from earlier workflows.","solutions":["Delete the Wan 2.1 GGUF and download the Wan 2.2 equivalents (Wan2.2-T2V-A14B / I2V-A14B / TI2V-5B GGUF builds)","Upgrade InvokeAI to a version whose Wan loader supports 2.1, if available","Renaming the file is not a fix: misnamed 2.1 files are still caught later by the architectural _find_wan_2_1_marker check"],"exampleFix":"// before\n# Wan2.1-T2V-14B-Q4_K_M.gguf in autoimport/main/\n// after\n# rm Wan2.1-T2V-14B-Q4_K_M.gguf && add Wan2.2-T2V-A14B-high-noise-Q4_K_M.gguf","handlingStrategy":"validation","validationCode":"identity = ''.join(c for c in path.stem.lower() if c.isalnum())\nif 'wan21' in identity:\n    raise SystemExit(f'{path.name} is Wan 2.1 — the Wan 2.2 loader cannot use it; download a 2.2 build')","typeGuard":null,"tryCatchPattern":"try:\n    import_model(path)\nexcept NotAMatchError as e:\n    if 'Wan 2.1' in str(e):\n        queue_download('Wan2.2-T2V-A14B-high-noise-Q4_K_M.gguf')  # replace with 2.2 equivalent\n    else:\n        raise","preventionTips":["Purge Wan 2.1 GGUFs from folders shared with InvokeAI autoimport","Follow current InvokeAI docs for the supported Wan version list","Check the filename for 'wan2.1'/'wan21' before downloading from old tutorials"],"tags":["model-manager","gguf","wan","version-incompatibility"],"backgroundTag":"unsupported-model-variant","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}