Nodes/DiffSynth-ComfyUI/DiffSynth: Z-Image Inference
ComfyUI Node

DiffSynth: Z-Image Inference

8 steps, CFG 1, and a negative prompt that does nothing

By modelscope·Created about a month ago·Updated a day ago· 8
DiffSynth: Z-Image Inference
  • pipe
  • input_image
  • edit_image
  • controlnet_inputs
  • image2lora_images
  • image
◄prompt►
◄seed0►
◄num_inference_steps8►
◄height1024►
◄width1024►
◄negative_prompt►
◄cfg_scale1.0►
◄denoising_strength1.0►
◄edit_image_auto_resizetrue►
◄sigma_shift0.0►

Z-Image is the reason a lot of people are still on 12GB cards and happy about it: a 6B model that does near-Flux quality in about thirty seconds at 1024×1024 on a 3060, Apache 2.0, uncensored. This node runs it inside the DiffSynth pack - same graph shape as the Wan and Qwen pipelines, very different scale.

Both models, one node

The node serves the whole Z-Image family, and the widgets tell them apart:

  • Z-Image-Turbo is guidance-distilled. You run it at 8 steps and CFG 1, which is what the defaults here assume.
  • Z-Image (the community says "Base") is the undistilled foundation, released later. It wants 25–50 steps and real CFG - the pack's own example graph for it runs 50 steps at CFG 4.

That difference isn't cosmetic. At CFG 1 the guidance is already baked into the weights, so negative_prompt is inert: it has nothing to steer against. People spend evenings writing negatives that Turbo cannot read. If you need negatives that work, you're on Base, at CFG 3–5, with the steps to match.

The inputs that matter

  • pipe - required, from DiffSynth: Z-Image Loader; it decides whether you're on Turbo or Base.
  • prompt - multi-line, natural language, bilingual. Closest cousin is Flux prose, not Danbooru tags. Turbo's plastic-skin reputation is mostly a prompting problem: name a physical camera and film stock instead of "masterpiece, 8k, photorealistic" and it sharpens up fast.
  • seed, num_inference_steps (8), height/width (1024 each).
  • negative_prompt, cfg_scale (1) - as above. Good baseline: Turbo at 1, Base at 3–5.
  • sigma_shift - the flow-matching schedule shift. At 0 you get the pipeline's own spacing. If you've read the native-ComfyUI advice about pushing a shift value on Turbo to smooth out detail, this is the equivalent dial; A/B it on one seed before trusting it.
  • input_image + denoising_strength - img2img. Strength near 1 replaces the image, lower keeps more of the original.
  • edit_image + edit_image_auto_resize - the instruction-editing path. Honest caution: as of August 2026, Z-Image-Edit is still listed as unreleased on the official repo, so treat this socket as a forward-looking one. The editing work went to Qwen-Image-Edit and Flux 2 Klein in the meantime.
  • image2lora_images - image-to-LoRA, the trick DiffSynth-Studio shipped alongside Z-Image: reference images in, a style LoRA distilled at inference time and applied to this run. It's a loose style match rather than a replacement for training, and it needs the extra encoder models loaded through ModelConfig.

Output: one image socket.

controlnet_inputs is the exception on this list. It's a wildcard socket expecting DiffSynth's own ControlNet input structures, and nothing in this pack builds them - the Z-Image Fun ControlNet unions exist, but you'd be assembling the structure yourself. Skip it on day one.

Install

Manager → search DiffSynth-ComfyUI → install → restart, or:

pip install git+https://github.com/modelscope/DiffSynth-Studio.git
cd ComfyUI/custom_nodes && git clone https://github.com/modelscope/DiffSynth-ComfyUI.git

The example graphs pull Tongyi-MAI/Z-Image-Turbo (or Z-Image) as transformer, text encoder, VAE, plus a tokenizer directory - a few gigabytes, fetched on first queue.

Common issues

  • Washed-out or burnt images. CFG above 1 on Turbo. It doesn't add adherence, it double-applies guidance; 1.5–3 adds saturation, past that it burns.
  • Slow it down and it gets worse. 8 steps is the distilled target. Ratcheting Turbo to 50 steps buys you time and little else.
  • The usual 2026 gotcha. Z-Image wants a separate text encoder and VAE - grabbed the transformer alone and it errors on the missing companions.
  • Sage Attention with Base. The widely reported combination for glitched or black output. Disable it for Base.
  • Any input socket changing after a diffsynth upgrade. They're generated at startup; restart ComfyUI.
CategoryDiffSynth/inference

Inputs (15)

NameTypeDefaultDescription
pipeDIFFSYNTH_PIPE—
promptSTRING—
seedINT00–4294967295—
num_inference_stepsINT81–200—
heightINT102464–4096—
widthINT102464–4096—
negative_promptoptSTRING—
cfg_scaleoptFLOAT1.00–10000—
input_imageoptIMAGE—
denoising_strengthoptFLOAT1.00–10000—
edit_imageoptIMAGE—
edit_image_auto_resizeoptBOOLEANtrue—
sigma_shiftoptFLOAT0.00–10000—
controlnet_inputsopt*—
image2lora_imagesoptIMAGE—

Outputs (1)

NameTypeDescription
imageIMAGE—