Nodes/ComfyUI-ZImageTurboHQNodes/ZImage Turbo Latent Init
ComfyUI Node

ZImage Turbo Latent Init

A blank latent that's actually sized for Z-Image

By marduk191·Created 7 months ago·Updated 7 months ago· 3
ZImage Turbo Latent Init
    • latent
    • width
    • height
    resolution1024
    batch_size1

    This is the pack's stand-in for EmptyLatentImage, and it's about as simple as a node gets: pick a resolution, pick a batch size, get a zeroed latent plus the width and height as separate integers.

    Why does a whole node exist for this? Because the pack wanted to be self-contained, and because Z-Image likes specific starting points. The model's native sweet spot is roughly 1MP to 2MP, and this node hands you the three square sizes people actually run: 1024, 1280, and 1536. It builds a 16-channel latent at resolution/8, which is exactly what the Z-Image VAE expects - no channel or scale mismatch surprises like you can get with a generic latent node that assumed SDXL's layout.

    Inputs: resolution (1024/1280/1536, default 1024) and batch_size (1–8, default 1). That's the whole list.

    Outputs: latent (the zeroed LATENT), plus width and height as INTs. The latent feeds the sampler's latent_image input. The width/height outputs are there for the workflow wiring you'll inevitably want - aspect-ratio math, an empty-latent check, driving an upscaler's target size.

    Fair warning baked into the design: everything is square. Z-Image can do 1216×832 and 1600×1088 and plenty of other aspect ratios, and if you need those you'll reach for an aspect-ratio or EmptyLatentImage node instead. This one is the opinionated "start here" default, and the shipped workflows treat it that way.

    Install is the pack-level routine: ComfyUI Manager → search "ZImageTurboHQNodes", or

    cd ComfyUI/custom_nodes
    git clone https://github.com/marduk191/ComfyUI-ZImageTurboHQNodes
    

    then restart. No extra dependencies, no model downloads from this node - it's pure tensor math. The models you still need for the full workflow (z_image_turbo_bf16.safetensors, qwen_3_4b.safetensors, a Z-Image VAE) come from Tongyi-MAI's HuggingFace repo, not the pack.

    About the only thing that bites here: batch_size up to 8 will happily blow your VRAM on a 1536 latent - 1536² is 2.36MP, past the model's native ceiling anyway, and 8 of them is a lot of memory for a sampler pass. If you want multiple images, a batch of 1–2 with repeated generation is usually the saner move on a 12GB card.

    Categoryzimage_turbo/hq

    Inputs (2)

    NameTypeDefaultDescription
    resolutionCOMBO10243 options: 1024, 1280, 1536
    batch_sizeINT11–8

    Outputs (3)

    NameTypeDescription
    latentLATENT
    widthINT
    heightINT