invoke-ai/InvokeAI · error · ValueError
The Component Source VAE is incompatible with the selected t
Error message
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.
What it means
When the VAE is derived from the Component Source, _validate_component_source_vae compares the source's variant against the main transformer variant. Wan 2.2 TI2V-5B needs the 48-channel VAE while A14B models need the 16-channel Wan 2.1 VAE; if main_is_ti2v != source_is_ti2v the pair is incompatible and invoke() raises this ValueError.
Source
Thrown at invokeai/app/invocations/wan_model_loader.py:335
if source_config.base != BaseModelType.Wan or source_config.type != ModelType.Main:
raise ValueError("The Component Source model must resolve to a Wan main model.")
if source_config.format != ModelFormat.Diffusers:
raise ValueError(
f"The Component Source model must be in Diffusers format. "
f"The selected model '{source_config.name}' is in {source_config.format.value} format."
)
@staticmethod
def _validate_component_source_vae(
context: InvocationContext, model: ModelIdentifierField, main_variant: WanVariantType
) -> 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
- Match the Component Source variant to the transformer: use a TI2V-5B source for TI2V-5B, an A14B source for A14B
- Set an explicit standalone 'VAE' with the correct latent channels (48 for TI2V-5B, 16 for A14B) instead of relying on Component Source
- Swap the main transformer to the variant matching the component source you already have
Example fix
// before: TI2V-5B transformer with A14B component source component_source=ModelIdentifierField(key='wan21-a14b-main', submodel_type=SubModelType.Transformer) // after component_source=ModelIdentifierField(key='wan22-ti2v-5b-main', submodel_type=SubModelType.Transformer)
Defensive patterns
Strategy: validation
Validate before calling
main_cfg = context.models.get_config(invocation.model)
src_cfg = context.models.get_config(invocation.component_source)
main_ti2v = getattr(main_cfg, 'variant', None) == WanVariantType.TI2V_5B
src_ti2v = getattr(src_cfg, 'variant', None) == WanVariantType.TI2V_5B
if main_ti2v != src_ti2v:
raise ValueError('Component Source variant must match transformer variant (TI2V-5B vs A14B)') Type guard
def variants_match(main_cfg, src_cfg) -> bool:
main_ti2v = getattr(main_cfg, 'variant', None) == WanVariantType.TI2V_5B
src_ti2v = getattr(src_cfg, 'variant', None) == WanVariantType.TI2V_5B
return main_ti2v == src_ti2v Try / catch
try:
output = invocation.invoke(context)
except ValueError as e:
if 'Component Source VAE is incompatible' in str(e):
invocation.component_source = select_source_matching_variant(main_variant) Prevention
- Keep Wan 2.1 and Wan 2.2 components in separate workflows
- Check the variant label on both transformer and component source before wiring
- Prefer explicit standalone VAE overrides with the correct channel count over implicit sources
When it happens
Trigger: invoke() where main model variant is TI2V-5B but the Component Source is a non-TI2V (A14B) Wan model, or vice versa.
Common situations: Mixing Wan 2.1 A14B components with a Wan 2.2 5B transformer (or the reverse); a workflow built for one Wan generation reused with the other's component source.
Related errors
- The standalone VAE is incompatible with the selected transfo
- The high-noise and low-noise models must use the same Wan va
- No source for VAE. Either set 'VAE' to a standalone Wan VAE,
- The VAE must resolve to a standalone Wan VAE model.
- Expected AutoencoderKLWan for Wan VAE, got {type(vae_info.mo
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/51ffc659caa25dd7.
Report an issue: GitHub.