feat(z-image): add Z-Image Base (undistilled) model variant support#8799
Conversation
- Add ZImageVariantType enum with 'turbo' and 'zbase' variants - Auto-detect variant on import via scheduler_config.json shift value (3.0=turbo, 6.0=zbase) - Add database migration to populate variant field for existing Z-Image models - Re-add LCM scheduler with variant-aware filtering (LCM hidden for zbase) - Auto-reset scheduler to Euler when switching to zbase model if LCM selected - Update frontend to show/hide LCM option based on model variant - Add toast notification when scheduler is auto-reset Z-Image Base models are undistilled and require more steps (28-50) with higher guidance (3.0-5.0), while Z-Image Turbo is distilled for ~8 steps with CFG 1.0. LCM scheduler only works with distilled (Turbo) models.
Issues involving Z-Image Turbo supportI found a couple of problems with support for Z-Image Turbo. Problem 1After pulling the PR and restarting the backend, I'm getting config validation errors on previously-installed Z-Image Turbo models, and they vanish from the model manager. Here is the type of error message that appears during startup: Problem 2Installing a new ZiT model (in this case |
|
I can confirm that Z-Image Base (Diffusers):
I was unable to test whether the LCM scheduler reappears when a turbo model is installed due to the earlier issues with turbo model validation errors. |
That is to be expected
i will take a look The zimage Turbo models should be getting a variant with the migration. Do you have the startup log? |
See |
|
I reported the same issue on Discord the other day; I should have posted it here in the first place. Here is a link to the log I pasted in Discord. https://discord.com/channels/1020123559063990373/1083864753543331981/1466506983627686062 Another example taken today using the db after updating to the latest release 6.11.0 [2026-02-01 13:11:55,731]::[InvokeAI]::WARNING --> Skipping invalid model config in the database with name Z-Image Turbo (Q8). Ignoring this model. ({"key": "7e351a8a-1201-4fd4-8b44-cb2c3672cbf7", "hash": "random:...)
[2026-02-01 13:11:55,731]::[InvokeAI]::WARNING --> Validation error: 1 validation error for tagged-union[Main_Diffusers_SD1_Config,Main_Diffusers_SD2_Config,Main_Diffusers_SDXL_Config,Main_Diffusers_SDXLRefiner_Config,Main_Diffusers_SD3_Config,Main_Diffusers_FLUX_Config,Main_Diffusers_Flux2_Config,Main_Diffusers_CogView4_Config,Main_Diffusers_ZImage_Config,Main_Checkpoint_SD1_Config,Main_Checkpoint_SD2_Config,Main_Checkpoint_SDXL_Config,Main_Checkpoint_SDXLRefiner_Config,Main_Checkpoint_Flux2_Config,Main_Checkpoint_FLUX_Config,Main_Checkpoint_ZImage_Config,Main_BnBNF4_FLUX_Config,Main_GGUF_Flux2_Config,Main_GGUF_FLUX_Config,Main_GGUF_ZImage_Config,VAE_Checkpoint_SD1_Config,VAE_Checkpoint_SD2_Config,VAE_Checkpoint_SDXL_Config,VAE_Checkpoint_FLUX_Config,VAE_Checkpoint_Flux2_Config,VAE_Diffusers_SD1_Config,VAE_Diffusers_SDXL_Config,VAE_Diffusers_Flux2_Config,ControlNet_Checkpoint_SD1_Config,ControlNet_Checkpoint_SD2_Config,ControlNet_Checkpoint_SDXL_Config,ControlNet_Checkpoint_FLUX_Config,ControlNet_Checkpoint_ZImage_Config,ControlNet_Diffusers_SD1_Config,ControlNet_Diffusers_SD2_Config,ControlNet_Diffusers_SDXL_Config,ControlNet_Diffusers_FLUX_Config,LoRA_LyCORIS_SD1_Config,LoRA_LyCORIS_SD2_Config,LoRA_LyCORIS_SDXL_Config,LoRA_LyCORIS_FLUX_Config,LoRA_LyCORIS_ZImage_Config,LoRA_OMI_SDXL_Config,LoRA_OMI_FLUX_Config,LoRA_Diffusers_SD1_Config,LoRA_Diffusers_SD2_Config,LoRA_Diffusers_SDXL_Config,LoRA_Diffusers_FLUX_Config,LoRA_Diffusers_ZImage_Config,ControlLoRA_LyCORIS_FLUX_Config,T5Encoder_T5Encoder_Config,T5Encoder_BnBLLMint8_Config,Qwen3Encoder_Qwen3Encoder_Config,Qwen3Encoder_Checkpoint_Config,Qwen3Encoder_GGUF_Config,TI_File_SD1_Config,TI_File_SD2_Config,TI_File_SDXL_Config,TI_Folder_SD1_Config,TI_Folder_SD2_Config,TI_Folder_SDXL_Config,IPAdapter_InvokeAI_SD1_Config,IPAdapter_InvokeAI_SD2_Config,IPAdapter_InvokeAI_SDXL_Config,IPAdapter_Checkpoint_SD1_Config,IPAdapter_Checkpoint_SD2_Config,IPAdapter_Checkpoint_SDXL_Config,IPAdapter_Checkpoint_FLUX_Config,T2IAdapter_Diffusers_SD1_Config,T2IAdapter_Diffusers_SDXL_Config,Spandrel_Checkpoint_Config,CLIPEmbed_Diffusers_G_Config,CLIPEmbed_Diffusers_L_Config,CLIPVision_Diffusers_Config,SigLIP_Diffusers_Config,FLUXRedux_Checkpoint_Config,LlavaOnevision_Diffusers_Config,Unknown_Config]
Input tag 'main.gguf_quantized.z-image' found using get_model_discriminator_value() does not match any of the expected tags: 'main.diffusers.sd-1', 'main.diffusers.sd-2', 'main.diffusers.sdxl', 'main.diffusers.sdxl-refiner', 'main.diffusers.sd-3', 'main.diffusers.flux', 'main.diffusers.flux2', 'main.diffusers.cogview4', 'main.diffusers.z-image', 'main.checkpoint.sd-1', 'main.checkpoint.sd-2', 'main.checkpoint.sdxl', 'main.checkpoint.sdxl-refiner', 'main.checkpoint.flux2', 'main.checkpoint.flux', 'main.checkpoint.z-image.turbo', 'main.bnb_quantized_nf4b.flux', 'main.gguf_quantized.flux2', 'main.gguf_quantized.flux', 'main.gguf_quantized.z-image.turbo', 'vae.checkpoint.sd-1', 'vae.checkpoint.sd-2', 'vae.checkpoint.sdxl', 'vae.checkpoint.flux', 'vae.checkpoint.flux2', 'vae.diffusers.sd-1', 'vae.diffusers.sdxl', 'vae.diffusers.flux2', 'controlnet.checkpoint.sd-1', 'controlnet.checkpoint.sd-2', 'controlnet.checkpoint.sdxl', 'controlnet.checkpoint.flux', 'controlnet.checkpoint.z-image', 'controlnet.diffusers.sd-1', 'controlnet.diffusers.sd-2', 'controlnet.diffusers.sdxl', 'controlnet.diffusers.flux', 'lora.lycoris.sd-1', 'lora.lycoris.sd-2', 'lora.lycoris.sdxl', 'lora.lycoris.flux', 'lora.lycoris.z-image', 'lora.omi.sdxl', 'lora.omi.flux', 'lora.diffusers.sd-1', 'lora.diffusers.sd-2', 'lora.diffusers.sdxl', 'lora.diffusers.flux', 'lora.diffusers.z-image', 'control_lora.lycoris.flux', 't5_encoder.t5_encoder.any', 't5_encoder.bnb_quantized_int8b.any', 'qwen3_encoder.qwen3_encoder.any', 'qwen3_encoder.checkpoint.any', 'qwen3_encoder.gguf_quantized.any', 'embedding.embedding_file.sd-1', 'embedding.embedding_file.sd-2', 'embedding.embedding_file.sdxl', 'embedding.embedding_folder.sd-1', 'embedding.embedding_folder.sd-2', 'embedding.embedding_folder.sdxl', 'ip_adapter.invokeai.sd-1', 'ip_adapter.invokeai.sd-2', 'ip_adapter.invokeai.sdxl', 'ip_adapter.checkpoint.sd-1', 'ip_adapter.checkpoint.sd-2', 'ip_adapter.checkpoint.sdxl', 'ip_adapter.checkpoint.flux', 't2i_adapter.diffusers.sd-1', 't2i_adapter.diffusers.sdxl', 'spandrel_image_to_image.checkpoint.any', 'clip_embed.diffusers.any.gigantic', 'clip_embed.diffusers.any.large', 'clip_vision.diffusers.any', 'siglip.diffusers.any', 'flux_redux.checkpoint.flux', 'llava_onevision.diffusers.any', 'unknown.unknown.unknown' [type=union_tag_invalid, input_value={'key': '7e351a8a-1201-4f...ed', 'variant': 'turbo'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.12/v/union_tag_invalid
|
…atch LoRA picker now hides Z-Image LoRAs with incompatible variants (e.g. ZBase LoRAs when using Turbo model). LoRAs without a variant are always shown. Backend loaders warn at runtime if a LoRA variant doesn't match the transformer variant.
|
The Errors on Startup should now be gone. Added Variant for the zimages lora. Updated the PR. |
lstein
left a comment
There was a problem hiding this comment.
Tested and works as advertised. The official Z-Image Base is recognized and has the correct default parameters. Generation works well and the LCM scheduler is only shown when Turbo is selected.
Both Base and Turbo variant LoRAs work properly. However please confirm that the system does not try to automatically detect Turbo and Base-specific LoRA variants. The user must always manually select the variant to apply in Model edit mode. Is this correct?
|
Yes The loras are technically indistinguishable. |
Summary
Z-Image Base models are undistilled and require more steps (28-50) with higher guidance (3.0-5.0), while Z-Image Turbo is distilled for ~8 steps with CFG 1.0. LCM scheduler only works with distilled (Turbo) models.
Only Tested with Diffusers version of the Model.
Related Issues / Discussions
Adds full support for Z-Image Base (undistilled) models alongside the existing Z-Image Turbo support.
QA Instructions
Merge Plan
Database migration (migration_26) adds variant field to existing Z-Image models. Safe to merge anytime.
Checklist
What's Newcopy (if doing a release after this PR)