Nodes/ZIT-Ideogram/Z-Image-Turbo Region Builder KJ
ComfyUI Node

Z-Image-Turbo Region Builder KJ

Draw boxes, get regional control — no Ideogram API required

By bbc-s·Created 3 months ago·Updated 3 months ago· 1
Z-Image-Turbo Region Builder KJ
  • clip
  • image
  • vae
  • positive
  • negative
  • region_masks
  • combined_mask
  • source_image
  • preview
  • regions_json
  • bboxes
  • width
  • height
  • latent_with_noise_mask
width1024
height1024
global_prompt
global_negative_prompt
modetext_to_image
default_region_strength1.00
default_feather16
conditioning_modesingle_prompt_fast
regions_data
bg_brightness35
batch_size1

First, the name is a lie you should be glad about. Z-Image-Turbo Region Builder KJ does not call Ideogram's API, needs no key, and won't install an Ideogram model on your box. It's a visual box editor for Z-Image-Turbo: you draw rectangles on a canvas, give each one a prompt (plus an optional per-region negative and strength), and it turns those boxes into native ComfyUI conditioning and masks. The "Ideogram" is just a nod to the pattern it borrows - KJNodes' editor for Ideogram 4's JSON captioning. Same drawing surface, totally different output.

Why you'd reach for it

Z-Image-Turbo is the community's 6B daily driver: fast on 12GB cards, ~30 seconds per 1024px image, Apache 2.0. Its weaknesses are the other half of that story - it's guidance-distilled, runs at CFG 1, and its adherence on complex multi-element prompts is loose. Two characters in one prompt bleed attributes together, and the model will happily ignore "the thing on the left." Regional prompting is the standing fix for exactly that, and this node gives Z-Image the same draw-on-a-canvas workflow people already know from Ideogram and GLIGEN.

Set expectations before you fall in love: the README says it plainly - ZIT was not built for hard box-constrained generation, so this can't reproduce Ideogram 4's API-level regional control. Z-Image wasn't trained on bounding-box captions. What you get is approximate regional guidance plus real masks, which is more than a plain prompt gives you.

How it works

The node splits the work into two tracks. In the default single_prompt_fast mode it folds every region prompt into one text prompt with rough area hints - your "girl with red hair" box becomes something like region 1 (upper left area): girl with red hair - encodes that once with your Z-Image/Qwen CLIP, and hands the masks out separately. Sampling speed stays close to a normal Z-Image workflow.

The alternative, regional_conditioning_slow, emits a separate masked conditioning per region. That can multiply sampler work by the number of regions and, per the author's own tooltip, often doesn't improve adherence on ZIT. Leave it alone - it's the "I tried it so you don't have to" mode.

The img2img path is where it gets genuinely useful. Connect an image and the workflow's vae, and the node encodes the source, attaches the combined box mask as the latent's noise_mask, and hands you a latent that behaves like masked inpainting. Sampler denoise around 0.6–0.8 is the practical range: visible regional change without wrecking the rest of the image.

The inputs and outputs that matter

For a first run you only need to care about a handful:

  • clip - your Z-Image/Qwen CLIP, same one the stock Z-Image-Turbo workflow uses.
  • global_prompt / global_negative_prompt - the scene-level text; region boxes layer on top.
  • mode - text_to_image or image_to_image_region_edit.
  • default_feather - mask edge softness. 0 is a hard rectangle, 8–24 a normal soft edge, 32+ a broad transition.
  • default_region_strength - mask opacity. In single_prompt_fast it does not make the text stronger; keep it near 1.0 and control edit intensity with denoise instead.
  • image / vae - optional; both connected switches on the img2img path.

The outputs that wire into your sampler: positive, negative, and latent_with_noise_mask. preview is handy through a Preview Image node, and regions_json shows you exactly what text the node composed before it hit CLIP - useful the first time a region misbehaves.

Install

ComfyUI Manager: search "ZIT-Ideogram" and install. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/bbc-s/ZIT-Ideogram

Restart ComfyUI, then add node via ZIT-Ideogram/Z-Image → Z-Image-Turbo Region Builder KJ. No extra Python packages - the pyproject dependency list is empty, and the node only needs what stock ComfyUI already ships. The heavy lifting is the model itself: you need a Z-Image-Turbo checkpoint and its Qwen CLIP loaded, which any working Z-Image-Turbo workflow already has. Start from ComfyUI's built-in Z-Image-Turbo graph and swap the text-encoder section for this node.

Where people get burned

The usual first disappointment is a region the model ignores or relocates. That's Z-Image-Turbo, not the node - it doesn't do hard boxes, so draw the region generously and treat the prompt hints as nudges. For edits like a clothing swap, draw bigger than the item so the model has context to rebuild edges. And remember the editor saves its boxes into regions_data, so your layout survives a workflow save/reload - that serialization is baked in.

It won't turn Z-Image-Turbo into Ideogram, but for regional edits and multi-subject bleeding it's the best drawing surface you'll get on this model.

CategoryZIT-Ideogram/Z-Image

Inputs (14)

NameTypeDefaultDescription
clipCLIP
widthINT102464–16384
heightINT102464–16384
global_promptSTRING
global_negative_promptSTRING
modeCOMBOtext_to_image2 options: text_to_image, image_to_image_region_edit
default_region_strengthFLOAT1.000–10Default mask strength for regions. In single_prompt_fast this affects mask/noise_mask outputs, not text prompt strength. For img2img edits keep near 1.0 and control change with KSampler denoise.
default_featherFLOAT160–512Default mask feather in pixels. 0 = hard rectangle edge, 8-24 = normal soft edge, 32+ = very soft transition.
conditioning_modeCOMBOsingle_prompt_fastRecommended: single_prompt_fast. regional_conditioning_slow is experimental for Z-Image-Turbo, often slower and less reliable because ZIT is not designed for masked multi-conditioning.
regions_dataSTRING
bg_brightnessSTRING35Background brightness. String for compatibility with older workflow widget ordering.
batch_sizeINT11–4096Batch size for the latent_with_noise_mask output. Kept at the end for workflow compatibility.
imageoptIMAGEOptional source/reference image shown in the editor and passed through.
vaeoptVAEOptional VAE. When provided with an image, the node also outputs an encoded latent with combined_mask as noise_mask for img2img regional edits.

Outputs (11)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
region_masksMASK
combined_maskMASK
source_imageIMAGE
previewIMAGE
regions_jsonSTRING
bboxesBOUNDING_BOX
widthINT
heightINT
latent_with_noise_maskLATENT