invoke-ai/InvokeAI · error · ValueError
Unsupported Z-Image model format: {transformer_config.format
Error message
Unsupported Z-Image model format: {transformer_config.format} What it means
Z-Image only knows how to load its transformer for Diffusers/Checkpoint (unquantized) and GGUF/SDNQ (quantized) model formats. Any other ModelFormat on the transformer config has no supported loading/patching path, so _run_diffusion raises ValueError with the offending format.
Source
Thrown at invokeai/app/invocations/z_image_denoise.py:444
# For Heun scheduler, the number of actual steps may differ
num_scheduler_steps = len(scheduler.timesteps)
else:
num_scheduler_steps = total_steps
with ExitStack() as exit_stack:
# Get transformer config to determine if it's quantized
transformer_config = context.models.get_config(self.transformer.transformer)
# Determine if the model is quantized.
# If the model is quantized, then we need to apply the LoRA weights as sidecar layers. This results in
# slower inference than direct patching, but is agnostic to the quantization format.
if transformer_config.format in [ModelFormat.Diffusers, ModelFormat.Checkpoint]:
model_is_quantized = False
elif transformer_config.format in [ModelFormat.GGUFQuantized, ModelFormat.SDNQQuantized]:
model_is_quantized = True
else:
raise ValueError(f"Unsupported Z-Image model format: {transformer_config.format}")
# Load transformer - always use base transformer, control is handled via extension
(cached_weights, transformer) = exit_stack.enter_context(transformer_info.model_on_device())
# Prepare control extension if control is provided
control_extension: ZImageControlNetExtension | None = None
if self.control is not None:
# Load control adapter using context manager (proper GPU memory management)
control_model_info = context.models.load(self.control.control_model)
(_, control_adapter) = exit_stack.enter_context(control_model_info.model_on_device())
assert isinstance(control_adapter, ZImageControlAdapter)
# Get control_in_dim from adapter config (16 for V1, 33 for V2.0)
adapter_config = control_adapter.config
control_in_dim = adapter_config.get("control_in_dim", 16)
num_control_blocks = adapter_config.get("num_control_blocks", 6)
View on GitHub (pinned to 0b6a024f2f)
Solutions
- Install/convert the Z-Image model to Diffusers, Checkpoint, GGUF, or SDNQ format
- Fix the model's format field in the model manager config to match the actual on-disk format
- Re-download the model from a source providing a supported format
- Check InvokeAI version/update notes for newly supported Z-Image formats
Example fix
// before
# model config: format = 'BnbQuantized'
transformer_info = context.models.get_by_key(z_image_model_key)
// after
# convert/reconfigure model so format in {Diffusers, Checkpoint, GGUFQuantized, SDNQQuantized}
transformer_info = context.models.get_by_key(z_image_model_key) Defensive patterns
Strategy: validation
Validate before calling
from invokeai.backend.model_manager.config import ModelFormat
SUPPORTED = {ModelFormat.Diffusers, ModelFormat.Checkpoint, ModelFormat.GGUFQuantized, ModelFormat.SDNQQuantized}
config = context.models.get_config(z_image_model_key)
assert config.format in SUPPORTED, f"Unsupported Z-Image format: {config.format}" Type guard
def is_supported_zimage_format(cfg) -> bool:
return cfg.format in {ModelFormat.Diffusers, ModelFormat.Checkpoint, ModelFormat.GGUFQuantized, ModelFormat.SDNQQuantized} Try / catch
try:
output = denoise.invoke(context)
except ValueError as e:
if "Unsupported Z-Image model format" in str(e):
raise ModelFormatError("convert the model to Diffusers/Checkpoint/GGUF/SDNQ") from e
raise Prevention
- Only install Z-Image checkpoints from sources with supported formats
- Verify the model-manager format field matches the file after conversion
- Keep InvokeAI updated for newly supported quantization formats
When it happens
Trigger: Selecting a Z-Image main model whose ModelConfig.format is not one of Diffusers, Checkpoint, GGUFQuantized, or SDNQQuantized — invoke() then reaches the format switch in _run_diffusion and falls into the else branch.
Common situations: Pointing the model manager at a model converted with an unsupported tool (e.g. bnb quantization) or an exotic/custom format; a model-manager config whose format enum was set incorrectly; using a model file from a different architecture's pipeline.
Related errors
- Unsupported model format: {config.format}
- The {model_name} model must be a Diffusers-style Z-Image pip
- The {model_name} model must be a Diffusers format model. The
- The {model_name} model must be a Diffusers-style FLUX.2 pipe
- To extract the VAE and Qwen3-VL encoder, the {model_name} mo
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/a06de20a7e0f1864.
Report an issue: GitHub.