{"record":{"id":"68a99909bc79b753","repo":"invoke-ai/InvokeAI","slug":"only-the-transformer-submodel-is-available-from-a","errorCode":null,"errorMessage":"Only the Transformer submodel is available from a GGUF Wan checkpoint. Pair with a standalone Wan VAE and Wan T5 encoder for the other components.","messagePattern":"Only the Transformer submodel is available from a GGUF Wan checkpoint\\. Pair with a standalone Wan VAE and Wan T5 encoder for the other components\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/backend/model_manager/load/model_loaders/wan.py","lineNumber":410,"sourceCode":"    pairing happens at the WanModelLoaderInvocation layer. TI2V-5B ships as a\n    single file.\n\n    Mirrors the QwenImage GGUF loader pattern: ``gguf_sd_loader`` -> strip the\n    ComfyUI ``model.diffusion_model.`` / ``diffusion_model.`` prefix if present\n    -> auto-detect arch from state-dict shapes -> ``init_empty_weights`` +\n    ``load_state_dict(strict=False, assign=True)``.\n    \"\"\"\n\n    def _load_model(\n        self,\n        config: AnyModelConfig,\n        submodel_type: Optional[SubModelType] = None,\n    ) -> AnyModel:\n        if not isinstance(config, Main_GGUF_Wan_Config):\n            raise TypeError(f\"Expected Main_GGUF_Wan_Config, got {type(config).__name__}.\")\n\n        if submodel_type != SubModelType.Transformer:\n            raise ValueError(\n                \"Only the Transformer submodel is available from a GGUF Wan checkpoint. \"\n                \"Pair with a standalone Wan VAE and Wan T5 encoder for the other components.\"\n            )\n\n        return self._load_from_singlefile(config)\n\n    def _load_from_singlefile(self, config: Main_GGUF_Wan_Config) -> AnyModel:\n        import accelerate\n        from diffusers import WanTransformer3DModel\n\n        from invokeai.backend.util.logging import InvokeAILogger\n\n        model_path = Path(config.path)\n        target_device = TorchDevice.choose_torch_device()\n        compute_dtype = TorchDevice.choose_bfloat16_safe_dtype(target_device)\n\n        sd = gguf_sd_loader(model_path, compute_dtype=compute_dtype)\n","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/backend/model_manager/load/model_loaders/wan.py#L392-L428","documentation":"A GGUF Wan checkpoint file contains only quantized transformer weights — no VAE or T5 text encoder. The loader therefore rejects any submodel_type other than Transformer, with guidance to pair the checkpoint with standalone Wan VAE and T5 components.","triggerScenarios":"Requesting SubModelType.VAE or SubModelType.TextEncoder from a model record pointing at a GGUF Wan checkpoint file, or calling the GGUF loader with submodel_type=None or an unexpected submodel.","commonSituations":"Expecting the GGUF file to behave like a full pipeline; model manager config incorrectly listing VAE/text-encoder submodels as sourced from the GGUF file; automation requesting all submodels uniformly.","solutions":["Only request SubModelType.Transformer from the GGUF Wan model record.","Register separate standalone Wan VAE and T5 encoder models and reference them in your pipeline setup.","If you need a single all-in-one model, use a full Wan pipeline (diffusers folder) instead of the GGUF single file."],"exampleFix":"// before\nvae = manager.load_model(gguf_config, submodel_type=SubModelType.VAE)\n\n// after\ntransformer = manager.load_model(gguf_config, submodel_type=SubModelType.Transformer)\nvae = manager.load_model(standalone_vae_config, submodel_type=SubModelType.VAE)","handlingStrategy":"validation","validationCode":"from invokeai.backend.model_manager import SubModelType\n\ndef validate_gguf_submodel(submodel_type):\n    if submodel_type != SubModelType.Transformer:\n        raise ValueError(\"GGUF Wan checkpoints provide only the Transformer; use standalone VAE/T5 models\")","typeGuard":null,"tryCatchPattern":"try:\n    model = manager.load_model(gguf_config, submodel_type)\nexcept ValueError as e:\n    if 'Only the Transformer submodel' in str(e):\n        model = manager.load_model(gguf_config, submodel_type=SubModelType.Transformer)\n    else:\n        raise","preventionTips":["Treat GGUF Wan records as transformer-only in automation code.","Register standalone Wan VAE and T5 encoder models alongside GGUF checkpoints.","Configure base models/pipelines to source VAE/text-encoder from separate records."],"tags":["gguf","wan","unsupported-operation","model-loading"],"backgroundTag":"unsupported-submodel-request","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}