invoke-ai/InvokeAI · error · ValueError

No VAE source provided. Either set 'VAE' to a FLUX VAE model

Error message

No VAE source provided. Either set 'VAE' to a FLUX VAE model, or set 'Qwen3 Source' to a Diffusers Z-Image model.

What it means

ZImageModelLoader needs a VAE but found no usable source: neither a standalone VAE model field, a Diffusers Z-Image Qwen3 source to extract the VAE submodel from, nor a self-contained SDNQ main model. It raises a ValueError telling the user which of the three inputs must be provided.

Source

Thrown at invokeai/app/invocations/z_image_model_loader.py:116

        # Qwen3 encoder and VAE as submodels of the main model. When the user hasn't selected a
        # standalone VAE / Qwen3 Encoder or a separate Qwen3 Source, fall back to the main model
        # itself for those submodels. This lets a freshly installed SDNQ Z-Image pipeline generate
        # without the user having to manually re-select the same model as a component source.
        self_contained_source = self._get_self_contained_source(context)

        # Determine VAE source
        if self.vae_model is not None:
            # Use standalone FLUX VAE
            vae = self.vae_model.model_copy(update={"submodel_type": SubModelType.VAE})
        elif self.qwen3_source_model is not None:
            # Extract from Diffusers Z-Image model
            self._validate_diffusers_format(context, self.qwen3_source_model, "Qwen3 Source")
            vae = self.qwen3_source_model.model_copy(update={"submodel_type": SubModelType.VAE})
        elif self_contained_source is not None:
            # Extract from the self-contained SDNQ main model
            vae = self_contained_source.model_copy(update={"submodel_type": SubModelType.VAE})
        else:
            raise ValueError(
                "No VAE source provided. Either set 'VAE' to a FLUX VAE model, "
                "or set 'Qwen3 Source' to a Diffusers Z-Image model."
            )

        # Determine Qwen3 Encoder source
        if self.qwen3_encoder_model is not None:
            # Use standalone Qwen3 Encoder
            qwen3_tokenizer = self.qwen3_encoder_model.model_copy(update={"submodel_type": SubModelType.Tokenizer})
            qwen3_encoder = self.qwen3_encoder_model.model_copy(update={"submodel_type": SubModelType.TextEncoder})
        elif self.qwen3_source_model is not None:
            # Extract from Diffusers Z-Image model
            self._validate_diffusers_format(context, self.qwen3_source_model, "Qwen3 Source")
            qwen3_tokenizer = self.qwen3_source_model.model_copy(update={"submodel_type": SubModelType.Tokenizer})
            qwen3_encoder = self.qwen3_source_model.model_copy(update={"submodel_type": SubModelType.TextEncoder})
        elif self_contained_source is not None:
            # Extract from the self-contained SDNQ main model
            qwen3_tokenizer = self_contained_source.model_copy(update={"submodel_type": SubModelType.Tokenizer})
            qwen3_encoder = self_contained_source.model_copy(update={"submodel_type": SubModelType.TextEncoder})

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Set the 'VAE' input to a FLUX VAE model (Z-Image reuses the Flux VAE).
  2. Or set 'Qwen3 Source' to a Diffusers Z-Image repo so VAE and encoder are derived from it.
  3. Or provide a self-contained SDNQ main model the submodels can be extracted from.
  4. Verify the referenced VAE still exists in the Model Manager if it was previously configured.

Example fix

// before
loader = ZImageModelLoaderInvocation(transformer=..., vae=None, qwen3_source_model=None)
// after
loader = ZImageModelLoaderInvocation(transformer=..., vae=ModelField(id='flux-vae'))
Defensive patterns

Strategy: validation

Validate before calling

if loader.vae is None and loader.qwen3_source_model is None and loader.main_model_is_sdnq is not True:
    raise ValueError("Provide VAE (FLUX VAE), a Diffusers Z-Image 'Qwen3 Source', or an SDNQ main model")

Try / catch

try:
    out = z_image_model_loader.invoke(context)
except ValueError as e:
    if "No VAE source" in str(e):
        context.logger.error("Set VAE to a FLUX VAE or use a Diffusers Z-Image Qwen3 Source.")
    else:
        raise

Prevention

When it happens

Trigger: invoke() reaches the VAE resolution block with vae_model None, qwen3_source_model None (no Diffusers-format source), and self_contained_source None - no SDNQ main either.

Common situations: Running the loader with only the transformer/main model set and VAE + Qwen3 Source left unconfigured; deleting the FLUX VAE model that previously filled the VAE field; importing a bare loader template without the auxiliary models.

Related errors


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