invoke-ai/InvokeAI · error · ValueError
No Mistral encoder source provided. Single-file / GGUF trans
Error message
No Mistral encoder source provided. Single-file / GGUF transformers require a separate text encoder. Options: 1. Set 'Mistral Encoder' to a standalone Mistral Small 3.1 text encoder model 2. Set 'Mistral Source' to a Diffusers FLUX.2 [dev] model to extract the encoder from
What it means
The FLUX.2 [dev] model loader throws this when a single-file or GGUF transformer is used but no Mistral text encoder source is provided. Such checkpoints lack the text encoder, so InvokeAI needs a standalone Mistral Small 3.1 encoder or a Diffusers FLUX.2 [dev] pipeline to extract the encoder (and tokenizer) from. Raised as ValueError in invoke() when all alternative sources are unset.
Source
Thrown at invokeai/app/invocations/flux2_dev_model_loader.py:158
"No VAE source provided. Single-file / GGUF transformers require a separate VAE. "
"Options:\n"
" 1. Set 'VAE' to a standalone FLUX.2 VAE model\n"
" 2. Set 'Mistral Source' to a Diffusers FLUX.2 [dev] model to extract the VAE from"
)
# Resolve Mistral encoder.
if self.mistral_encoder_model is not None:
tokenizer = self.mistral_encoder_model.model_copy(update={"submodel_type": SubModelType.Tokenizer})
text_encoder = self.mistral_encoder_model.model_copy(update={"submodel_type": SubModelType.TextEncoder})
elif main_is_diffusers:
tokenizer = self.model.model_copy(update={"submodel_type": SubModelType.Tokenizer})
text_encoder = self.model.model_copy(update={"submodel_type": SubModelType.TextEncoder})
elif self.mistral_source_model is not None:
self._validate_encoder_source(context, self.mistral_source_model, "Mistral Source")
tokenizer = self.mistral_source_model.model_copy(update={"submodel_type": SubModelType.Tokenizer})
text_encoder = self.mistral_source_model.model_copy(update={"submodel_type": SubModelType.TextEncoder})
else:
raise ValueError(
"No Mistral encoder source provided. Single-file / GGUF transformers require a separate "
"text encoder. Options:\n"
" 1. Set 'Mistral Encoder' to a standalone Mistral Small 3.1 text encoder model\n"
" 2. Set 'Mistral Source' to a Diffusers FLUX.2 [dev] model to extract the encoder from"
)
return Flux2DevModelLoaderOutput(
transformer=TransformerField(transformer=transformer, loras=[]),
mistral_encoder=MistralEncoderField(tokenizer=tokenizer, text_encoder=text_encoder),
vae=VAEField(vae=vae),
max_seq_len=self.max_seq_len,
)
def _validate_diffusers_format(
self, context: InvocationContext, model: ModelIdentifierField, model_name: str
) -> AnyModelConfig:
"""Validate that a model is a Diffusers-format pipeline and return its config.
View on GitHub (pinned to 0b6a024f2f)
Solutions
- Connect a standalone Mistral Small 3.1 text encoder model to the 'Mistral Encoder' input.
- Connect a Diffusers FLUX.2 [dev] model to the 'Mistral Source' input to extract the encoder from it.
Example fix
// before loader = Flux2DevModelLoader(model=gguf_transformer) // after loader = Flux2DevModelLoader(model=gguf_transformer, mistral_encoder=mistral_small_3_1_encoder)
Defensive patterns
Strategy: validation
Validate before calling
# before invoking the loader
if not mistral_encoder_input and not mistral_source_input:
raise ValueError("Single-file/GGUF transformers need a 'Mistral Encoder' or a Diffusers 'Mistral Source'") Type guard
def has_encoder_source(loader) -> bool:
return loader.mistral_encoder is not None or loader.mistral_source_model is not None Try / catch
try:
output = loader.invoke(context)
except ValueError as e:
if "No Mistral encoder source provided" in str(e):
loader.mistral_source_model = diffusers_flux2_dev_model
output = loader.invoke(context)
else:
raise Prevention
- Remember GGUF/single-file FLUX.2 checkpoints exclude the text encoder; always supply one.
- Prefer wiring a Diffusers FLUX.2 [dev] model as Mistral Source to cover both VAE and encoder needs.
- Validate all loader inputs are connected before queueing.
When it happens
Trigger: invoke() runs with a non-Diffusers (single-file/GGUF) main model, the 'Mistral Encoder' input is unset, and self.mistral_source_model is None.
Common situations: Users load a GGUF FLUX.2 transformer for lower VRAM usage but forget that the text encoder must come from elsewhere, leaving the 'Mistral Encoder' and 'Mistral Source' node inputs empty.
Related errors
- No VAE source provided. Single-file / GGUF transformers requ
- The {model_name} model must be a FLUX.2 [dev] pipeline, but
- Expected PreTrainedModel for text encoder, got {type(text_en
- Mistral encoder did not return hidden_states. Ensure output_
- Mistral encoder returned only {num_layers} hidden layer(s),
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/a3234ce33b37b576.
Report an issue: GitHub.