{"record":{"id":"56a2bfa960dcfa9d","repo":"invoke-ai/InvokeAI","slug":"no-source-for-wan-t5-encoder-either-set-wan-t5-e","errorCode":null,"errorMessage":"No source for Wan T5 encoder. Either set 'Wan T5 Encoder' to a standalone UMT5-XXL encoder, or set 'Component Source' to a Diffusers Wan main model.","messagePattern":"No source for Wan T5 encoder\\. Either set 'Wan T5 Encoder' to a standalone UMT5-XXL encoder, or set 'Component Source' to a Diffusers Wan main model\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/wan_model_loader.py","lineNumber":293,"sourceCode":"                \"or set 'Component Source' to a Diffusers Wan main model.\"\n            )\n\n        # Tokenizer + text encoder: standalone override > main (if Diffusers) > component source.\n        if self.wan_t5_encoder_model is not None:\n            t5_config = context.models.get_config(self.wan_t5_encoder_model)\n            if t5_config.type != ModelType.WanT5Encoder or t5_config.format != ModelFormat.WanT5Encoder:\n                raise ValueError(\"The Wan T5 Encoder must resolve to a standalone Wan T5 encoder model.\")\n            tokenizer = self.wan_t5_encoder_model.model_copy(update={\"submodel_type\": SubModelType.Tokenizer})\n            text_encoder = self.wan_t5_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.component_source is not None:\n            self._validate_component_source_format(context, self.component_source)\n            tokenizer = self.component_source.model_copy(update={\"submodel_type\": SubModelType.Tokenizer})\n            text_encoder = self.component_source.model_copy(update={\"submodel_type\": SubModelType.TextEncoder})\n        else:\n            raise ValueError(\n                \"No source for Wan T5 encoder. \"\n                \"Either set 'Wan T5 Encoder' to a standalone UMT5-XXL encoder, \"\n                \"or set 'Component Source' to a Diffusers Wan main model.\"\n            )\n\n        return WanModelLoaderOutput(\n            transformer=WanTransformerField(\n                transformer=transformer,\n                transformer_low_noise=transformer_low_noise,\n                boundary_ratio=boundary_ratio,\n            ),\n            wan_t5_encoder=WanT5EncoderField(tokenizer=tokenizer, text_encoder=text_encoder),\n            vae=VAEField(vae=vae),\n        )\n\n    @staticmethod\n    def _validate_main_config(config: object, label: str) -> None:\n        if getattr(config, \"base\", None) != BaseModelType.Wan or getattr(config, \"type\", None) != ModelType.Main:","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/wan_model_loader.py#L275-L311","documentation":"The loader resolves the Wan tokenizer and text encoder from, in order: the standalone 'Wan T5 Encoder' override, the main model if Diffusers, or the 'Component Source'. If all three are unavailable (non-Diffusers main model, no T5 override, no component source), invoke() raises this ValueError because text encoding is impossible.","triggerScenarios":"invoke() with a GGUF or single-file checkpoint main model, wan_t5_encoder_model unset, and component_source unset.","commonSituations":"Using a GGUF Wan transformer with no standalone UMT5-XXL encoder installed; a workflow copied from someone else missing the T5 encoder field; forgetting that single-file checkpoints don't include tokenizer/text-encoder components.","solutions":["Set 'Wan T5 Encoder' to a standalone UMT5-XXL encoder model","Set 'Component Source' to a Diffusers Wan main model to source tokenizer and text encoder","Switch the main model to a Diffusers folder containing the text-encoder components","Install/scan the UMT5-XXL encoder into the Model Manager if it is missing"],"exampleFix":"// before\nWanModelLoaderInvocation(model=gguf_model)\n// after\nWanModelLoaderInvocation(model=gguf_model, wan_t5_encoder_model=ModelIdentifierField(key='umt5-xxl', submodel_type=SubModelType.TextEncoder))","handlingStrategy":"validation","validationCode":"cfg = context.models.get_config(invocation.model)\nnon_diffusers = cfg.format != ModelFormat.Diffusers\nif non_diffusers and invocation.wan_t5_encoder_model is None and invocation.component_source is None:\n    raise ValueError('Need a Wan T5 Encoder or Diffusers Component Source for tokenizer/text-encoder')","typeGuard":"def has_text_encoder_source(inv) -> bool:\n    cfg = get_config(inv.model)\n    return cfg.format == ModelFormat.Diffusers or inv.wan_t5_encoder_model is not None or inv.component_source is not None","tryCatchPattern":"try:\n    output = invocation.invoke(context)\nexcept ValueError as e:\n    if 'No source for Wan T5 encoder' in str(e):\n        invocation.wan_t5_encoder_model = install_or_pick_umt5_xxl()","preventionTips":["Install the UMT5-XXL encoder once and reference it whenever using GGUF/checkpoint Wan transformers","Check that workflows include a T5 encoder source when the main model is single-file","Prefer Diffusers folders so text-encoder components come bundled"],"tags":["model-loader","missing-model","wan","t5-encoder"],"backgroundTag":"missing-required-model","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}