Z-Image-Turbo Region Builder KJ
Draw boxes, get regional control — no Ideogram API required
- clip
- image
- vae
- positive
- negative
- region_masks
- combined_mask
- source_image
- preview
- regions_json
- bboxes
- width
- height
- latent_with_noise_mask
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_imageorimage_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. Insingle_prompt_fastit 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.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| width | INT | 102464–16384 | — |
| height | INT | 102464–16384 | — |
| global_prompt | STRING | — | |
| global_negative_prompt | STRING | — | |
| mode | COMBO | text_to_image | 2 options: text_to_image, image_to_image_region_edit |
| default_region_strength | FLOAT | 1.000–10 | Default 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_feather | FLOAT | 160–512 | Default mask feather in pixels. 0 = hard rectangle edge, 8-24 = normal soft edge, 32+ = very soft transition. |
| conditioning_mode | COMBO | single_prompt_fast | Recommended: 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_data | STRING | — | |
| bg_brightness | STRING | 35 | Background brightness. String for compatibility with older workflow widget ordering. |
| batch_size | INT | 11–4096 | Batch size for the latent_with_noise_mask output. Kept at the end for workflow compatibility. |
| imageopt | IMAGE | Optional source/reference image shown in the editor and passed through. | |
| vaeopt | VAE | Optional 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)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| region_masks | MASK | — |
| combined_mask | MASK | — |
| source_image | IMAGE | — |
| preview | IMAGE | — |
| regions_json | STRING | — |
| bboxes | BOUNDING_BOX | — |
| width | INT | — |
| height | INT | — |
| latent_with_noise_mask | LATENT | — |