{"record":{"id":"1354152c49acbb15","repo":"invoke-ai/InvokeAI","slug":"wan-2-1-gguf-models-are-not-supported-by-the-wan-2-135415","errorCode":null,"errorMessage":"Wan 2.1 GGUF models are not supported by the Wan 2.2 loader: {wan_2_1_reason}","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":2222,"sourceCode":"        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\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","sourceCodeStart":2204,"sourceCodeEnd":2240,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/backend/model_manager/configs/main.py#L2204-L2240","documentation":"Same family as the name-based Wan 2.1 rejection, but this fires on architecture instead of naming: _find_wan_2_1_marker inspects the state dict for architectural markers unique to Wan 2.1 transformers, and any returned reason is appended to the error. It exists so misnamed 2.1 GGUFs (a Wan 2.1 model renamed to 'wan22...') are still rejected.","triggerScenarios":"Importing a Wan 2.1 GGUF whose filename/metadata lacks 'wan21' (renamed accidentally or by a mirror), so the earlier name check passes but state-dict markers betray the 2.1 architecture; corrupted or hybrid conversions embedding 2.1 block layouts.","commonSituations":"Renamed downloads from torrent/mirror sites losing the original name; publishers repackaging 2.1 weights under 2.2 names.","solutions":["Replace the file with a true Wan 2.2 GGUF from an official/community-trusted repo (Kijai, QuantStack, Comfy-Org)","Stop renaming GGUFs hoping to change variant — detection is architectural and will still reject","If you specifically need Wan 2.1, use a loader/version that supports it"],"exampleFix":"// before\n# wan22_t2v.gguf  (actually a renamed Wan 2.1 Q4_K_M file)\n// after\n# download the real Wan2.2-T2V-A14B gguf; do not rename 2.1 files","handlingStrategy":"validation","validationCode":"from invokeai.backend.model_manager.model_on_disk import ModelOnDisk\nfrom invokeai.backend.model_manager.configs.main import _find_wan_2_1_marker\n\nreason = _find_wan_2_1_marker(ModelOnDisk(path).load_state_dict())\nif reason is not None:\n    print(f'{path.name} is a Wan 2.1 model despite its name: {reason}')","typeGuard":null,"tryCatchPattern":"try:\n    import_model(path)\nexcept NotAMatchError as e:\n    if str(e).startswith('Wan 2.1 GGUF models are not supported'):\n        print('Renaming cannot fix this — the file is architecturally Wan 2.1. Get a 2.2 build.')\n    else:\n        raise","preventionTips":["Never rename model files to evade incompatibility — markers are architectural","Only download Wan GGUFs from trusted repos that keep original names","Keep checksums against the publisher's file list for bulk downloads"],"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"}