Nodes/Diffusion_pipe_in_ComfyUI/Z-Image模型配置
ComfyUI Node

Z-Image模型配置

Z-Image training, and the turbo adapter that saves it

By TianDongL·Created 11 months ago·Updated 7 months ago· 69
Z-Image模型配置
    • model_path
    merge_adapters
    checkpoint_path
    diffusion_path
    text_encoder_path
    vae_path

    Z-Image is one of the 2026-era transformer image models, and its LoRAs have a quirk you need to know about before you train one: they're saved in ComfyUI format, not Diffusers format, and the Turbo variant demands a special adapter merged in or your gradients turn to noise. ZImageModelNode is the node that handles all of that - and its tooltip is refreshingly direct about the one field that will wreck your run if you skip it.

    The support table gives Z-Image LoRA and full fine-tune support, and the README credits Ostris and ai-toolkit for the turbo adapter - this is genuinely bleeding-edge territory.

    How it works

    The node builds a {"type": "z_image", ...} config from whatever combination of paths you fill in. Nothing is required - all five inputs are optional - but the config only makes sense if you supply one coherent set:

    • checkpoint_path - a Diffusers-format Z-Image-Turbo folder. If you use this, the tooltip says the other three path fields must stay empty.
    • diffusion_path - the ComfyUI-format bf16 transformer (note the tooltip: needs bf16). Used together with text_encoder_path (the text encoder is registered as lumina2 type in the config) and vae_path.

    And the star of the show:

    • merge_adapters - the Z-Image-Turbo training adapter, downloadable from ostris/zimage_turbo_training_adapter. The tooltip doesn't mince words: training turbo without it will break the model's gradients and your results collapse. This is the one field to never skip when training Turbo.

    The inputs that matter

    • merge_adapters - required for Z-Image-Turbo training. Get it from https://huggingface.co/ostris/zimage_turbo_training_adapter.
    • checkpoint_path - the Diffusers-format option (then leave the ComfyUI pieces empty).
    • diffusion_path + text_encoder_path + vae_path - the ComfyUI-format option.

    Output: model_pathModelConfig.

    Install

    Pack-wide - ComfyUI Manager (search "Diffusion_pipe_in_ComfyUI") or:

    cd ComfyUI/custom_nodes
    git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
    cd Diffusion_pipe_in_ComfyUI
    git submodule init && git submodule update
    pip install -r requirements.txt
    

    Linux/WSL2 only. The README also insists on the latest diffusers development build for Z-Image training:

    pip install git+https://github.com/huggingface/diffusers
    

    Where people get burned

    The list is short and the README screams about all of it. One: train Turbo without merge_adapters and your run looks healthy while producing garbage - the tooltip's warning about destroyed gradients is the exact failure. Two: mix the two model formats (Diffusers checkpoint_path plus ComfyUI paths) and the config is contradictory; pick one format per run. Three: forget the Z-Image LoRAs come out in ComfyUI format - if you test them with a Diffusers-format workflow they won't load, and that's expected, not a corrupt file. It's the fiddliest node in the pack, but the tooltips are honest enough that you can get it right on the first try.

    CategoryDiffusion-Pipe/Model

    Inputs (5)

    NameTypeDefaultDescription
    merge_adaptersoptSTRINGMerge Adapter 模型文件夹的完整路径,训练turbo时这个模型是必须的,否则会破坏模型梯度,导致效果崩塌,你可以在https://huggingface.co/ostris/zimage_turbo_training_adapter/resolve/main/zimage_turbo_training_adapter_v1.safetensors?download=true找到
    checkpoint_pathoptSTRINGZ-Image-Turbo 模型文件夹的完整路径,这里可以使用diffusers官方模型,但是使用了diffusers格式的模型,下面三种路径需要保持为空
    diffusion_pathoptSTRINGComfyui格式模型文件夹的完整路径,需要加载bf16格式的模型
    text_encoder_pathoptSTRINGText Encoder 模型文件夹的完整路径,
    vae_pathoptSTRINGVAE 模型文件夹的完整路径

    Outputs (1)

    NameTypeDescription
    model_pathmodel_path