invoke-ai/InvokeAI · error · ValueError

The same model is wired to both 'Transformer' and 'Transform

Error message

The same model is wired to both 'Transformer' and 'Transformer (Low Noise)'. A Wan A14B expert pair needs two different single-file models.

What it means

WanModelLoaderInvocation.invoke raises this when the same model key is wired to both the 'Transformer' (high-noise) and 'Transformer (Low Noise)' inputs on an A14B (dual-expert) variant. A Wan A14B pair requires two distinct single-file models (high + low expert); using the identical file for both slots is rejected. Note the TI2V-5B variant is exempt — there the low-noise input is simply ignored with a warning.

Source

Thrown at invokeai/app/invocations/wan_model_loader.py:166

        if main_is_diffusers:
            transformer = self.model.model_copy(update={"submodel_type": SubModelType.Transformer})
            if getattr(main_config, "has_dual_expert", False):
                transformer_low_noise = self.model.model_copy(update={"submodel_type": SubModelType.Transformer2})
                recorded = getattr(main_config, "boundary_ratio", None)
                if recorded is not None:
                    boundary_ratio = float(recorded)
        elif main_is_single_file:
            primary_expert = getattr(main_config, "expert", "none")
            primary_id = self.model.model_copy(update={"submodel_type": SubModelType.Transformer})

            if self.transformer_low_noise_model is not None and main_variant == WanVariantType.TI2V_5B:
                # The field's own docs promise this input is ignored for the
                # single-expert TI2V-5B — e.g. a leftover wire from an A14B session.
                context.logger.warning("'Transformer (Low Noise)' is ignored for the single-expert TI2V-5B variant.")

            if self.transformer_low_noise_model is not None and main_variant != WanVariantType.TI2V_5B:
                if self.transformer_low_noise_model.key == self.model.key:
                    raise ValueError(
                        "The same model is wired to both 'Transformer' and 'Transformer (Low Noise)'. "
                        "A Wan A14B expert pair needs two different single-file models."
                    )
                low_config = context.models.get_config(self.transformer_low_noise_model)
                self._validate_main_config(low_config, "Transformer (Low Noise)")
                # The two experts don't have to share a format — both single-file
                # loaders produce a plain WanTransformer3DModel, so a GGUF high-noise
                # expert pairs fine with a safetensors low-noise one.
                if low_config.format not in _SINGLE_FILE_FORMATS:
                    raise ValueError(
                        f"'Transformer (Low Noise)' must be a single-file Wan model (GGUF or checkpoint). "
                        f"'{low_config.name}' is in {low_config.format.value} format."
                    )
                low_id = self.transformer_low_noise_model.model_copy(update={"submodel_type": SubModelType.Transformer})
                low_expert = getattr(low_config, "expert", "none")

                if getattr(low_config, "variant", None) != main_variant:
                    low_variant = getattr(low_config, "variant", None)

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Select a different model in 'Transformer (Low Noise)' — the complementary low-noise expert file for your A14B pair.
  2. If you actually run the single-expert TI2V-5B variant, disconnect the low-noise input entirely (it is ignored there anyway).
  3. Verify the two selected models differ by comparing their keys before invoking.

Example fix

// before
if self.transformer_low_noise_model.key == self.model.key:  # same model both slots -> ValueError
    raise ValueError(...)
// after: wire distinct experts
transformer = wan_a14b_high_noise_model
transformer_low_noise_model = wan_a14b_low_noise_model  # different key
Defensive patterns

Strategy: validation

Validate before calling

if transformer_low_noise_model is not None and transformer_low_noise_model.key == model.key:
    raise ValueError("Wire a distinct low-noise expert (or disconnect the input for TI2V-5B)")

Type guard

def expert_pair_is_distinct(main, low) -> bool:
    return low is None or low.key != main.key

Try / catch

try:
    out = wan_model_loader.invoke(context)
except ValueError as e:
    if "wired to both" in str(e):
        select_distinct_low_noise_model() or disconnect_low_noise_input()
    else:
        raise

Prevention

When it happens

Trigger: Selecting the identical model (same key) in both the 'Transformer' and 'Transformer (Low Noise)' fields of wan_model_loader while the main model's variant is A14B; copying the main model field into the low-noise field when building a workflow; leftover wire from a session where one model served both slots.

Common situations: Users configuring Wan 2.2 A14B dual-expert inference who mistakenly pick the same GGUF/checkpoint twice; duplicated workflow nodes where both inputs reference one model; misunderstanding that A14B needs separate high- and low-noise files.

Related errors


AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29). Data as JSON: /api/errors/96f69b46d63a9bb8. Report an issue: GitHub.