Nodes/ComfyUI-IntoTheLatent-Utils/ITL Ideogram 4 Prompt Builder
ComfyUI Node

ITL Ideogram 4 Prompt Builder

The ITL Prompt Builder

By Into-The-Latent·Created 29 days ago·Updated 15 days ago· 2
ITL Ideogram 4 Prompt Builder
  • image
  • bboxes
  • prompt
  • preview
  • bboxes
  • width
  • height
width1024
height1024
high_level_description
background
style
aesthetics
lighting
medium
style_palette_data
elements_data
bg_brightness25
import_modewhen empty
output_formatcompact
coord_modenormalized
bbox_orderyx
import_json

Ideogram 4 is a strange model: it's trained almost entirely on structured JSON captions, not prose, so a plain prompt like "a red fox in a forest" comes out noticeably worse than the same idea written as fields, hex palettes, and bounding boxes. The catch is that the schema is miserable to type by hand. This node is the fix - a full visual canvas editor where you draw boxes, describe each one, and it assembles the caption JSON for you.

The name might make you expect an API key and a server call. It's nothing of the sort: this is a local ComfyUI node that just formats text. The heavy lifting happens in the model you wire the output into - Ideogram 4's own sampler - and this node only builds the JSON that model was trained on.

How it works

Ideogram 4's caption format centers on a compositional_deconstruction with elements - each one has a bbox, a desc, an optional verbatim text, and a color_palette of hex colors. Boxes live on a 0–1000 grid as [ymin, xmin, ymax, xmax], they can overlap and nest, and that's the whole trick: the model gives you genuine regional control because boxes were baked into its training, not bolted on afterwards (the regional-prompting story is long; Ideogram 4 is the first time it's native).

You draw on the canvas, the editor serializes your regions into the hidden elements_data field, and at run time the node merges that with your text fields and outputs one compact JSON string. If this smells like Kijai's KJNodes Ideogram builder, that's because the author lifted the canvas editor from it (with attribution, GPL-3.0) and layered on parenting, named groups, and a scene-tree overview - but it coexists fine with KJNodes, so you don't have to uninstall anything.

The inputs that matter

Most of the node's inputs are managed by the UI - elements_data and style_palette_data are just serialized editor state you shouldn't touch. The ones you actually set:

  • width / height - the canvas aspect (and the pixel grid boxes are measured in). Ideogram 4 wants multiples of 16, and the node enforces that with its step of 16. Default 1024×1024.
  • background - the required one-line scene description that sits behind all your boxes. It's marked required for a reason: leave it blank and you get a meh image.
  • high_level_description - optional one-liner overview of the whole image; blank omits it.
  • style (plus aesthetics, lighting, medium) - Ideogram's style descriptors. These are where the companion ITL Style Wizard plugs in.

Two that bite beginners: import_mode controls what a wired import_json does - when empty only seeds the editor (so you can still edit), always makes the wired JSON authoritative. And the image input is just a reference shown as the canvas background so you can trace boxes over a real picture - the "Grab BG" button does the same with your last generated output.

Outputs

  • prompt (STRING) - the caption JSON. This goes into whatever node your Ideogram 4 workflow uses to encode the structured caption.
  • preview (IMAGE) - a rendered overlay of your boxes, so you can eyeball the layout.
  • bboxes (BOUNDING_BOX) - pixel-space boxes, handy if you're feeding a SAM3 or crop step downstream.
  • width / height (INT) - the canvas dimensions, for Empty Latent or resolution plumbing.

Installing it

Grab it through ComfyUI Manager (search "ComfyUI-IntoTheLatent-Utils") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Into-The-Latent/ComfyUI-IntoTheLatent-Utils

Then restart ComfyUI. No extra dependencies - it uses Pillow and the canvas is pure front-end JS, both already shipped. Note the repo is published for reference: issues are disabled and PRs are auto-closed, so don't expect support.

Gotchas

The one I keep hitting: the canvas editor lives in the node's own panel, and new users sometimes edit a region, close the panel, and wonder why nothing changed - the node's output only refreshes on a run, and output_format/coord_mode/bbox_order are all toolbar settings, not widgets. Leave coord_mode on normalized (the 0–1000 grid Ideogram expects) and bbox_order on yx unless you're exporting for Qwen-VL, which wants xy. And remember this pack renamed nodes from the old AI2Go* IDs - old workflows won't auto-pick these up, but keeping the old pack installed lets both coexist.

CategoryInto The Latent/text

Inputs (18)

NameTypeDefaultDescription
widthINT102464–16384Canvas aspect width (also the pixel grid the bbox is measured in). Ideogram 4 needs multiples of 16.
heightINT102464–16384Canvas aspect height (also the pixel grid the bbox is measured in). Ideogram 4 needs multiples of 16.
high_level_descriptionSTRINGOptional one-line overview of the whole image (blank = omitted).
backgroundSTRINGRequired scene background description.
styleCOMBO3 options: [object Object], [object Object], [object Object]
aestheticsSTRINGStyle descriptor (blank = omitted).
lightingSTRINGStyle descriptor (blank = omitted).
mediumSTRINGStyle descriptor (blank = omitted).
style_palette_dataSTRINGSerialized style color palette from the editor (managed by the node UI).
elements_dataSTRINGSerialized regions from the editor (managed by the node UI).
bg_brightnessINT250–100Background image brightness % (managed by the node UI slider).
import_modeCOMBOwhen emptyHow a wired import_json is used: 'when empty' only seeds the editor while it has no regions (then the editor wins, so you can edit); 'always' makes the wired JSON authoritative so its changes always propagate to the output.
output_formatSTRINGcompactOutput JSON formatting (set via the editor toolbar): 'compact' (default, what Ideogram 4 expects) or 'pretty' (indented, for readability).
coord_modeSTRINGnormalizedbbox coordinate space (set via the editor toolbar): 'normalized' (default, the 0-1000 grid Ideogram 4 expects) or 'absolute' (pixels, scaled by width/height — NON-STANDARD for Ideogram, for other tools that want pixel coords).
bbox_orderSTRINGyxbbox axis order (set via the editor toolbar): 'yx' (default, Ideogram's [ymin,xmin,ymax,xmax]) or 'xy' ([xmin,ymin,xmax,ymax], the standard x1,y1,x2,y2 that Qwen-VL and most detectors use).
imageoptIMAGEOptional reference image shown as the editor background (and behind the preview).
import_jsonoptSTRINGOptional: a full caption JSON. When connected, it loads into the editor and drives the output per 'import_mode'.
bboxesoptBOUNDING_BOX[object Object]Optional pixel-space boxes ({x, y, width, height}) used to seed the editor's regions when it has none. Ignored once regions exist.

Outputs (5)

NameTypeDescription
promptSTRING
previewIMAGE
bboxesBOUNDING_BOX
widthINT
heightINT