AI2Go Ideogram 4 Prompt Builder
Draw your Ideogram 4 prompt on a canvas — the way the model actually wants it
- image
- bboxes
- prompt
- preview
- bboxes
- width
- height
Ideogram 4 doesn't want a prose prompt. It wants a structured JSON caption - hex color palettes, bounding boxes on a 0–1000 grid, typed text elements - and if you hand it plain sentences it quietly underperforms. This node is a canvas editor that assembles that JSON for you: you drag boxes over a reference image, type what goes in each one, and it writes the caption. No hand-typing [ymin, xmin, ymax, xmax] arrays. It's the flagship of the ComfyUI-AI2Go-Utils pack, and it's a polished fork of Kijai's KJNodes prompt builder - same bones, more layout tooling on top. Both run side by side without conflict, so you're not choosing between them so much as picking your editor.
What you're actually building
The prompt output is the structured caption. Every region you draw becomes an element with a type (obj or text), a description, a color palette, and a bbox. On top sit the scene-graph fields Ideogram 4 expects: an optional high_level_description for the whole image, a required background scene description, and style descriptors (aesthetics, lighting, medium) that steer the render.
The inputs a beginner actually sets:
width/height- canvas aspect and the pixel grid the bboxes are measured in. Multiples of 16, matching Ideogram 4's native rules.background- the required scene background description.high_level_description- an optional one-line overview; left blank it's omitted.
Everything else is canvas work: drag to draw, Ctrl-drag to force-draw over an existing box, click to select, Alt-click to cycle overlapping regions, Del to remove, Ctrl+C/V/D to copy/paste/duplicate. Double-click a region to edit its description inline. Parent regions under one another and they move as a unit; groups (right-click the Overview panel) are editor-only organizers - they never make it into the exported prompt. There's a live token estimate and you can set the background to a reference image, the last generated image, or the live sampling preview.
The outputs
prompt- the assembled caption JSON. Feed it to your Ideogram 4 text-encode path.bboxes- pixel-space boxes, useful if you're chaining into SAM3 or crop nodes downstream.preview- a rendered overlay image so you can eyeball the layout before queueing.width/height- the canvas dimensions, for wiring into latent or size nodes.
Install
ComfyUI Manager → search "ComfyUI-AI2Go-Utils", or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/Little-God1983/ComfyUI-AI2Go-Utils
Restart ComfyUI. No heavy dependencies: the only requirement is Pillow, which already ships with ComfyUI. No model files to download, no API key - the name's a bit of a lie, but a pleasant one.
Gotchas
import_jsonvs your edits: the defaultwhen emptymode only seeds the editor while it has no regions, then your canvas wins. Flip toalwaysif you want a wired-in JSON caption to stay authoritative.- Bbox order and coordinates: the defaults are Ideogram's
yxorder on the normalized 0–1000 grid. If you're handing boxes to something Qwen-VL-flavored, switchbbox_ordertoxyand/orcoord_modetoabsolutein the toolbar. - Copy/paste carries a small
_ai2gosidecar that preserves groups and hierarchy for a lossless AI2Go→AI2Go round-trip, while staying two-way compatible with KJNodes captions. The sidecar never reaches the model. - Know this going in: the pack is published "for reference." Issues are disabled and PRs close automatically, so don't expect support - but it's GPL-3.0, so you can fork it if you need to change something.
If you pair it with the pack's Resolution Selector (to keep dimensions in Ideogram 4's valid range) and the Style Wizard (to click together aesthetics/lighting), you've got most of a competent Ideogram 4 setup without touching the JSON by hand.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102464–16384 | Canvas aspect width (also the pixel grid the bbox is measured in). Ideogram 4 needs multiples of 16. |
| height | INT | 102464–16384 | Canvas aspect height (also the pixel grid the bbox is measured in). Ideogram 4 needs multiples of 16. |
| high_level_description | STRING | Optional one-line overview of the whole image (blank = omitted). | |
| background | STRING | Required scene background description. | |
| style | COMBO | 3 options: [object Object], [object Object], [object Object] | |
| aesthetics | STRING | Style descriptor (blank = omitted). | |
| lighting | STRING | Style descriptor (blank = omitted). | |
| medium | STRING | Style descriptor (blank = omitted). | |
| style_palette_data | STRING | Serialized style color palette from the editor (managed by the node UI). | |
| elements_data | STRING | Serialized regions from the editor (managed by the node UI). | |
| bg_brightness | INT | 250–100 | Background image brightness % (managed by the node UI slider). |
| import_mode | COMBO | when empty | How 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_format | STRING | compact | Output JSON formatting (set via the editor toolbar): 'compact' (default, what Ideogram 4 expects) or 'pretty' (indented, for readability). |
| coord_mode | STRING | normalized | bbox 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_order | STRING | yx | bbox 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). |
| imageopt | IMAGE | Optional reference image shown as the editor background (and behind the preview). | |
| import_jsonopt | STRING | Optional: a full caption JSON. When connected, it loads into the editor and drives the output per 'import_mode'. | |
| bboxesopt | BOUNDING_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)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| preview | IMAGE | — |
| bboxes | BOUNDING_BOX | — |
| width | INT | — |
| height | INT | — |