invoke-ai/InvokeAI · error · NotAMatchError
Wan A14B GGUF filename or metadata must identify the model…
Error message
Wan A14B GGUF filename or metadata must identify the model as Wan 2.2
What it means
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.
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
Example fix
// before # mv high-noise-Q4_K_M.gguf autoimport/main/ // after # mv high-noise-Q4_K_M.gguf autoimport/main/Wan2.2-I2V-A14B-high-noise-Q4_K_M.gguf && rescan
Defensive patterns
Strategy: validation
Validate before calling
identity = ''.join(c for c in (path.stem + gguf_general_name).lower() if c.isalnum())
if 'a14b' in identity and 'wan22' not in identity:
print(f'{path.name}: rename to include wan2.2 (and which expert) before importing') Try / catch
try:
import_model(path)
except NotAMatchError as e:
if 'must identify the model as Wan 2.2' in str(e):
new = path.with_name('Wan2.2-' + path.name)
path.rename(new)
import_model(new)
else:
raise Prevention
- 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
When it happens
Trigger: 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.
Common situations: Stripping original names when organizing model folders; sites that rename files to SEO slugs; metadata-stripped GGUF repacks.
Related errors
- could not determine Wan variant from state dict
- state dict does not look like a Wan transformer
- state dict has no undecorated transformer block weights —…
- {unsupported_reason}
- Wan 2.1 GGUF models are not supported by the Wan 2.2 loader
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/1fe19c3917e1c7d2.
Report an issue: GitHub.
Appendix: source
Thrown at invokeai/backend/model_manager/configs/main.py:2229
raise NotAMatchError(unsupported_reason)
gguf_name = mod.metadata().get("general.name", "")
normalized_identity = "".join(
character for character in f"{mod.path.stem} {gguf_name}".lower() if character.isalnum()
)
if "wan21" in normalized_identity:
raise NotAMatchError("Wan 2.1 GGUF models are not supported by the Wan 2.2 loader")
# A misnamed Wan 2.1 GGUF slips past the name check above; the architectural
# markers don't care what the file is called.
wan_2_1_reason = _find_wan_2_1_marker(sd)
if wan_2_1_reason is not None:
raise NotAMatchError(f"Wan 2.1 GGUF models are not supported by the Wan 2.2 loader: {wan_2_1_reason}")
explicit_variant = override_fields.pop("variant", None)
variant = explicit_variant or _detect_wan_variant_from_state_dict(sd)
if variant is None:
raise NotAMatchError("could not determine Wan variant from state dict")
if variant in (WanVariantType.T2V_A14B, WanVariantType.I2V_A14B) and "wan22" not in normalized_identity:
raise NotAMatchError("Wan A14B GGUF filename or metadata must identify the model as Wan 2.2")
expert = _resolve_wan_expert(mod, override_fields, variant)
return cls(**override_fields, variant=variant, expert=expert)
class Main_Checkpoint_Wan_Config(Checkpoint_Config_Base, Main_Config_Base, Config_Base):
"""Model config for single-file Wan 2.2 transformer checkpoints (safetensors).
This is the format the community ships on CivitAI and in ComfyUI-oriented
Hugging Face repos: one ``.safetensors`` per transformer, in either the native
upstream key layout or the diffusers one, optionally under a
``model.diffusion_model.`` prefix, and optionally ComfyUI ``fp8_scaled``
quantized. The loader normalises all of those.
As with GGUF, A14B's MoE arrives as two files (one per expert); ``expert``
records which one this is so the Wan model loader invocation can pair them.
TI2V-5B is single-transformer and stores ``expert='none'``.View on GitHub (pinned to 0b6a024f2f)