{"record":{"id":"d601d6e7adc74444","repo":"invoke-ai/InvokeAI","slug":"the-standalone-vae-is-incompatible-with-the-select","errorCode":null,"errorMessage":"The standalone VAE is incompatible with the selected transformer. TI2V-5B requires the 48-channel Wan 2.2 VAE; A14B models require the 16-channel Wan 2.1 VAE.","messagePattern":"The standalone VAE is incompatible with the selected transformer\\. TI2V-5B requires the 48-channel Wan 2\\.2 VAE; A14B models require the 16-channel Wan 2\\.1 VAE\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/wan_model_loader.py","lineNumber":349,"sourceCode":"        source_variant = getattr(source_config, \"variant\", None)\n        main_is_ti2v = main_variant == WanVariantType.TI2V_5B\n        source_is_ti2v = source_variant == WanVariantType.TI2V_5B\n        if main_is_ti2v != source_is_ti2v:\n            raise ValueError(\n                \"The Component Source VAE is incompatible with the selected transformer. \"\n                \"TI2V-5B requires the 48-channel Wan 2.2 VAE; A14B models require the 16-channel Wan 2.1 VAE.\"\n            )\n\n    @staticmethod\n    def _validate_standalone_vae(\n        context: InvocationContext, model: ModelIdentifierField, main_variant: WanVariantType\n    ) -> None:\n        vae_config = context.models.get_config(model)\n        if vae_config.base != BaseModelType.Wan or vae_config.type != ModelType.VAE:\n            raise ValueError(\"The VAE must resolve to a standalone Wan VAE model.\")\n        expected_channels = 48 if main_variant == WanVariantType.TI2V_5B else 16\n        if vae_config.latent_channels != expected_channels:\n            raise ValueError(\n                \"The standalone VAE is incompatible with the selected transformer. \"\n                \"TI2V-5B requires the 48-channel Wan 2.2 VAE; A14B models require the 16-channel Wan 2.1 VAE.\"\n            )\n","sourceCodeStart":331,"sourceCodeEnd":353,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/wan_model_loader.py#L331-L353","documentation":"After confirming the standalone VAE is a Wan VAE, _validate_standalone_vae checks latent_channels against the main variant: 48 for TI2V-5B (Wan 2.2), 16 for A14B (Wan 2.1). A mismatch means the VAE was trained for the other Wan generation, so invoke() raises this ValueError.","triggerScenarios":"invoke() where the standalone VAE passes the type check but vae_config.latent_channels != expected_channels — i.e. a 16-channel Wan 2.1 VAE paired with a TI2V-5B transformer, or a 48-channel Wan 2.2 VAE paired with an A14B transformer.","commonSituations":"Mixing Wan 2.1 and Wan 2.2 models in one workflow; upgrading a workflow to Wan 2.2 5B while keeping the old 2.1 VAE override; downloading the wrong-generation VAE file.","solutions":["Select the VAE matching the transformer: 48-channel Wan 2.2 VAE for TI2V-5B, 16-channel Wan 2.1 VAE for A14B","Clear the VAE override so the loader picks a matching VAE from a Diffusers main model or Component Source","Download and install the correct-generation Wan VAE into the Model Manager"],"exampleFix":"// before: TI2V-5B transformer with Wan 2.1 VAE (16ch)\nvae=ModelIdentifierField(key='wan21-vae-16ch', submodel_type=SubModelType.VAE)\n// after\nvae=ModelIdentifierField(key='wan22-ti2v-vae-48ch', submodel_type=SubModelType.VAE)","handlingStrategy":"validation","validationCode":"vae_cfg = context.models.get_config(invocation.vae_model)\nmain_cfg = context.models.get_config(invocation.model)\nexpected = 48 if getattr(main_cfg, 'variant', None) == WanVariantType.TI2V_5B else 16\nif vae_cfg.latent_channels != expected:\n    raise ValueError(f'VAE has {vae_cfg.latent_channels} latent channels, need {expected}')","typeGuard":"def vae_matches_variant(vae_cfg, main_variant) -> bool:\n    expected = 48 if main_variant == WanVariantType.TI2V_5B else 16\n    return vae_cfg.latent_channels == expected","tryCatchPattern":"try:\n    output = invocation.invoke(context)\nexcept ValueError as e:\n    if 'standalone VAE is incompatible with the selected transformer' in str(e):\n        invocation.vae_model = select_vae_for_variant(main_variant)","preventionTips":["Pair Wan 2.2 TI2V-5B only with 48-channel VAEs and A14B only with 16-channel VAEs","When upgrading a workflow across Wan generations, update the VAE override too","Inspect latent_channels in the model details before selecting a standalone VAE"],"tags":["model-loader","incompatible-models","wan","vae","channel-mismatch"],"backgroundTag":"model-incompatibility","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}