{"record":{"id":"96d56f790939b3fa","repo":"invoke-ai/InvokeAI","slug":"the-model-name-model-must-be-a-diffusers-style-z","errorCode":null,"errorMessage":"The {model_name} model must be a Diffusers-style Z-Image pipeline (with VAE / Qwen3 submodels). The selected model '{config.name}' is in {config.format.value} format.","messagePattern":"The (.+?) model must be a Diffusers-style Z-Image pipeline \\(with VAE / Qwen3 submodels\\)\\. The selected model '(.+?)' is in (.+?) format\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/z_image_model_loader.py","lineNumber":174,"sourceCode":"        Otherwise we fall through and require an explicit VAE / Qwen3 source.\"\"\"\n        config = context.models.get_config(self.model)\n        if is_self_contained_sdnq_pipeline(config):\n            return self.model\n        return None\n\n    def _validate_diffusers_format(\n        self, context: InvocationContext, model: ModelIdentifierField, model_name: str\n    ) -> None:\n        \"\"\"Validate that a model exposes the diffusers-style submodel layout (transformer / vae /\n        text_encoder / tokenizer subfolders). Plain diffusers Z-Image pipelines satisfy this;\n        SDNQ-quantized ZImagePipeline folders do too, but only when they ship the VAE + Qwen3\n        submodels. Single-file SDNQ Z-Image checkpoints and partial pipelines are rejected.\"\"\"\n        config = context.models.get_config(model)\n        if config.format == ModelFormat.Diffusers:\n            return\n        if is_self_contained_sdnq_pipeline(config):\n            return\n        raise ValueError(\n            f\"The {model_name} model must be a Diffusers-style Z-Image pipeline (with VAE / Qwen3 \"\n            f\"submodels). The selected model '{config.name}' is in {config.format.value} format.\"\n        )\n","sourceCodeStart":156,"sourceCodeEnd":178,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/z_image_model_loader.py#L156-L178","documentation":"_validate_diffusers_format in invokeai/app/invocations/z_image_model_loader.py requires the selected Z-Image model to be a Diffusers-format pipeline containing VAE and Qwen3 text-encoder submodels. Single-file SDNQ Z-Image checkpoints and partial pipelines cannot be loaded by this invocation, so a ValueError is raised naming the model and its actual format. The check passes only when config.format == ModelFormat.Diffusers or the config is a self-contained SDNQ pipeline.","triggerScenarios":"Calling the Z-Image model loader invocation with a model whose ModelConfig format is not ModelFormat.Diffusers (e.g. single-file checkpoint or partial pipeline) and which is not recognized by is_self_contained_sdnq_pipeline(config).","commonSituations":"User installs a single-file SDNQ Z-Image .safetensors checkpoint or a checkpoint missing VAE/Qwen3 submodel folders; model imported with the wrong format in the model manager; using an older/non-Diffusers conversion of Z-Image.","solutions":["Convert or download the Z-Image model as a full Diffusers pipeline directory containing VAE and Qwen3 text-encoder submodels.","Re-import the model in InvokeAI's model manager selecting the Diffusers format so config.format is correct.","If using an SDNQ checkpoint, ensure it is a self-contained pipeline (all submodels embedded) so is_self_contained_sdnq_pipeline accepts it.","Verify the model folder contains all required submodel directories (transformer, vae, text_encoder/tokenizer) and re-scan models."],"exampleFix":"// before: single-file SDNQ checkpoint selected\nmodel = \"z-image-sdnq-single.safetensors\"\n// after: full Diffusers pipeline directory\nmodel = \"stabilityai/z-image\"  # Diffusers format with VAE/Qwen3 submodels","handlingStrategy":"validation","validationCode":"config = context.models.get_config(model)\nif config.format != ModelFormat.Diffusers and not is_self_contained_sdnq_pipeline(config):\n    raise ValueError(f\"{config.name} must be a Diffusers Z-Image pipeline with VAE/Qwen3 submodels (got {config.format.value})\")","typeGuard":null,"tryCatchPattern":"try:\n    loader.invoke(context)\nexcept ValueError as e:\n    if \"must be a Diffusers-style Z-Image pipeline\" in str(e):\n        # prompt user to install/convert the model as Diffusers format\n        ...\n    else:\n        raise","preventionTips":["Only install Z-Image models distributed as full Diffusers pipelines.","Check the model's format field in the model manager before wiring it into the graph.","Keep SDNQ single-file checkpoints out of Z-Image loader nodes unless fully self-contained."],"tags":["model-format","diffusers","z-image","model-loader"],"backgroundTag":"unsupported-model-format","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}