Nodes/ComfyUI-AI2Go-Utils/AI2Go Ideogram 4 Prompt Builder
ComfyUI Node

AI2Go Ideogram 4 Prompt Builder

Draw your Ideogram 4 prompt on a canvas — the way the model actually wants it

By Little-God1983·Created 2 months ago·Updated 15 days ago· 2
AI2Go 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 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_json vs your edits: the default when empty mode only seeds the editor while it has no regions, then your canvas wins. Flip to always if you want a wired-in JSON caption to stay authoritative.
  • Bbox order and coordinates: the defaults are Ideogram's yx order on the normalized 0–1000 grid. If you're handing boxes to something Qwen-VL-flavored, switch bbox_order to xy and/or coord_mode to absolute in the toolbar.
  • Copy/paste carries a small _ai2go sidecar 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.

CategoryAI2Go/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