{"record":{"id":"a3234ce33b37b576","repo":"invoke-ai/InvokeAI","slug":"no-mistral-encoder-source-provided-single-file","errorCode":null,"errorMessage":"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","messagePattern":"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","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/flux2_dev_model_loader.py","lineNumber":158,"sourceCode":"                \"No VAE source provided. Single-file / GGUF transformers require a separate VAE. \"\n                \"Options:\\n\"\n                \"  1. Set 'VAE' to a standalone FLUX.2 VAE model\\n\"\n                \"  2. Set 'Mistral Source' to a Diffusers FLUX.2 [dev] model to extract the VAE from\"\n            )\n\n        # Resolve Mistral encoder.\n        if self.mistral_encoder_model is not None:\n            tokenizer = self.mistral_encoder_model.model_copy(update={\"submodel_type\": SubModelType.Tokenizer})\n            text_encoder = self.mistral_encoder_model.model_copy(update={\"submodel_type\": SubModelType.TextEncoder})\n        elif main_is_diffusers:\n            tokenizer = self.model.model_copy(update={\"submodel_type\": SubModelType.Tokenizer})\n            text_encoder = self.model.model_copy(update={\"submodel_type\": SubModelType.TextEncoder})\n        elif self.mistral_source_model is not None:\n            self._validate_encoder_source(context, self.mistral_source_model, \"Mistral Source\")\n            tokenizer = self.mistral_source_model.model_copy(update={\"submodel_type\": SubModelType.Tokenizer})\n            text_encoder = self.mistral_source_model.model_copy(update={\"submodel_type\": SubModelType.TextEncoder})\n        else:\n            raise ValueError(\n                \"No Mistral encoder source provided. Single-file / GGUF transformers require a separate \"\n                \"text encoder. Options:\\n\"\n                \"  1. Set 'Mistral Encoder' to a standalone Mistral Small 3.1 text encoder model\\n\"\n                \"  2. Set 'Mistral Source' to a Diffusers FLUX.2 [dev] model to extract the encoder from\"\n            )\n\n        return Flux2DevModelLoaderOutput(\n            transformer=TransformerField(transformer=transformer, loras=[]),\n            mistral_encoder=MistralEncoderField(tokenizer=tokenizer, text_encoder=text_encoder),\n            vae=VAEField(vae=vae),\n            max_seq_len=self.max_seq_len,\n        )\n\n    def _validate_diffusers_format(\n        self, context: InvocationContext, model: ModelIdentifierField, model_name: str\n    ) -> AnyModelConfig:\n        \"\"\"Validate that a model is a Diffusers-format pipeline and return its config.\n","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/flux2_dev_model_loader.py#L140-L176","documentation":"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.","triggerScenarios":"invoke() runs with a non-Diffusers (single-file/GGUF) main model, the 'Mistral Encoder' input is unset, and self.mistral_source_model is None.","commonSituations":"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.","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."],"exampleFix":"// before\nloader = Flux2DevModelLoader(model=gguf_transformer)\n// after\nloader = Flux2DevModelLoader(model=gguf_transformer, mistral_encoder=mistral_small_3_1_encoder)","handlingStrategy":"validation","validationCode":"# before invoking the loader\nif not mistral_encoder_input and not mistral_source_input:\n    raise ValueError(\"Single-file/GGUF transformers need a 'Mistral Encoder' or a Diffusers 'Mistral Source'\")","typeGuard":"def has_encoder_source(loader) -> bool:\n    return loader.mistral_encoder is not None or loader.mistral_source_model is not None","tryCatchPattern":"try:\n    output = loader.invoke(context)\nexcept ValueError as e:\n    if \"No Mistral encoder source provided\" in str(e):\n        loader.mistral_source_model = diffusers_flux2_dev_model\n        output = loader.invoke(context)\n    else:\n        raise","preventionTips":["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."],"tags":["invokeai","model-loader","text-encoder","missing-input","flux2"],"backgroundTag":"missing-required-model-input","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}