invoke-ai/InvokeAI · error · ValueError
The VAE must resolve to a standalone Wan VAE model.
Error message
The VAE must resolve to a standalone Wan VAE model.
What it means
_validate_standalone_vae checks that an explicitly provided VAE resolves to a config with base Wan and type VAE. If the field points at any other model kind, invoke() raises this ValueError before channel-count checks. It ensures the standalone VAE override is actually a Wan VAE model.
Source
Thrown at invokeai/app/invocations/wan_model_loader.py:346
) -> None:
WanModelLoaderInvocation._validate_component_source_format(context, model)
source_config = context.models.get_config(model)
source_variant = getattr(source_config, "variant", None)
main_is_ti2v = main_variant == WanVariantType.TI2V_5B
source_is_ti2v = source_variant == WanVariantType.TI2V_5B
if main_is_ti2v != source_is_ti2v:
raise ValueError(
"The Component Source 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."
)
@staticmethod
def _validate_standalone_vae(
context: InvocationContext, model: ModelIdentifierField, main_variant: WanVariantType
) -> None:
vae_config = context.models.get_config(model)
if vae_config.base != BaseModelType.Wan or vae_config.type != ModelType.VAE:
raise ValueError("The VAE must resolve to a standalone Wan VAE model.")
expected_channels = 48 if main_variant == WanVariantType.TI2V_5B else 16
if vae_config.latent_channels != expected_channels:
raise ValueError(
"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."
)
View on GitHub (pinned to 0b6a024f2f)
Solutions
- Set 'VAE' to a standalone Wan VAE model (base=Wan, type=VAE)
- Re-import the VAE if its registered type/base metadata is wrong
- Clear the override and let the loader use a Diffusers main model or Component Source for the VAE
Example fix
// before vae=ModelIdentifierField(key='sdxl-vae', submodel_type=SubModelType.VAE) // after vae=ModelIdentifierField(key='wan-vae', submodel_type=SubModelType.VAE)
Defensive patterns
Strategy: validation
Validate before calling
if invocation.vae_model is not None:
cfg = context.models.get_config(invocation.vae_model)
if cfg.base != BaseModelType.Wan or cfg.type != ModelType.VAE:
raise ValueError('VAE field must point at a standalone Wan VAE') Type guard
def is_standalone_wan_vae(field, ctx) -> bool:
cfg = ctx.models.get_config(field)
return cfg.base == BaseModelType.Wan and cfg.type == ModelType.VAE Try / catch
try:
output = invocation.invoke(context)
except ValueError as e:
if 'must resolve to a standalone Wan VAE model' in str(e):
invocation.vae_model = select_wan_vae() Prevention
- Select the VAE only from Wan VAE-typed models in the Model Manager
- Fix base/type metadata on mis-registered VAE imports
- Don't reuse VAE fields from other-base (e.g. SDXL) workflows
When it happens
Trigger: invoke() with the 'VAE' field set to a model whose config.base != Wan or config.type != VAE — e.g. a SDXL VAE, a Wan Main model, or a T5 encoder placed in the VAE field.
Common situations: Selecting the wrong model in the VAE dropdown; reusing a workflow field that previously held a different model type; a VAE imported with incorrect type metadata.
Related errors
- No source for VAE. Either set 'VAE' to a standalone Wan VAE,
- The Wan T5 Encoder must resolve to a standalone Wan T5 encod
- The {label} model must resolve to a Wan main model.
- The Component Source model must resolve to a Wan main model.
- The Component Source VAE is incompatible with the selected t
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/deb5f7359b148e21.
Report an issue: GitHub.