Ideogram 4 Prompt Builder
Ideogram 4's mandatory JSON prompt, built by pointing at a canvas
- image
- bboxes
- prompt_builder
- prompt
- preview
- bboxes
- width
- height
Ideogram 4 is a JSON-prompting model. Plain text works, but the model is built around a structured caption - a high-level description, background, style blocks, and named regions with bounding boxes. Typing that JSON by hand is misery. AIOIdeogram4PromptBuilder gives you a visual editor that produces it: you lay out regions on a canvas, describe them, and the node emits the structured JSON plus conveniences like prompt (the JSON as a string), preview, bboxes, width, and height.
It's the AIO pack's adaptation of Kijai's Ideogram4PromptBuilderKJ from ComfyUI-KJNodes - the README credits it, and the GPL-3.0 licensing of this whole pack is a direct consequence of that borrowing.
What it does
The output you want for generation is the first one, prompt_builder (type AIO_IDEOGRAM4_PROMPT). Wire it into the prompt_builder socket on AIOIdeogram4Settings - or, if you're running Krea 2, into AIOKrea2Settings's prompt_builder, because Krea 2 shares the same structured-prompt lineage. When connected, the generated JSON replaces the main node's positive_prompt, and the builder's resolved dimensions override the main node's size controls. The plain prompt STRING output exists for nodes that only accept text, and preview gives you a rendered look at what the editor is building.
The controls worth knowing
max side,aspect ratio,multiple value- the builder uses the same dimension calculation asAIO Image Generate, and deliberately exposes no raw width/height inputs. Ideogram 4 wants multiples of 16, somultiple valueshould sit at 16.style-none,photo, orart_style. If you pickphoto, describe it in thephotofield;art_stylefor the other.aesthetics,lighting, andmediumare emitted when a style block is active.high_level_description,background- the one-line overview and scene background. Blank means omitted.coord_mode-normalized(0–1000 grid, the default Ideogram convention) orabsolute(resolved pixels).bbox_order-yxis Ideogram's[ymin,xmin,ymax,xmax];xyis Qwen-style[xmin,ymin,xmax,ymax]. Flip toxyfor Krea/Qwen-style image models that expect that order.import_mode-when empty(seed the editor fromimport_jsononly if it has nothing) oralways.output_format-compactmatches Ideogram 4's training format and is what you want for generation;prettyis for humans reading it.privacy_mode- encrypts the builder text and editor state in saved workflows (see the pack's privacy feature), with the node UI masking text until hovered.
Optional inputs: image shows behind the editor as a reference canvas, import_json imports a full caption JSON, and bboxes seeds editor regions from pixel-space boxes when the editor is empty.
Setting it up
Part of the AIO pack:
cd ComfyUI/custom_nodes
git clone https://github.com/helto4real/comfyui-all-on-one-image-generation-node
cd comfyui-all-on-one-image-generation-node
python -m pip install -r requirements.txt
Or install via ComfyUI Manager (search "AIO Image Generate") and restart. All nodes land under AIO/Image.
Where people trip
- You don't have to use it, but the model rewards it. Ideogram 4's real strengths - text rendering, layout control, character/IP recall - come through the structured format. Skipping it and typing a plain prompt is leaving the point of the model on the table.
- The
promptstring output and theprompt_buildersocket are different things. If you connectpromptto the settings node, the typing won't match - you want the first output. The string output is for text-only consumers elsewhere in the graph. bbox_ordermatters per model. The defaultyxis right for Ideogram 4; switch toxyfor Krea 2. A model fed boxes in the wrong order will scatter regions across the canvas.- Dimensions come from the builder when it's connected. Set
max side/aspect ratiohere, not on the main node - the main node's size controls get overridden.
One JSON schema, two model families, zero hand-typed braces. That's the pitch, and it holds up.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| max side | INT | 1024256–4096 | Longest generated edge in pixels. Uses the same calculation as AIO Image Generate. |
| aspect ratio | COMBO | 1:1 | Output shape to use with max side. Uses the same calculation as AIO Image Generate. |
| multiple value | COMBO | none | Round dimensions to the selected multiple. Ideogram 4 should normally use 16. |
| privacy_mode | BOOLEAN | false | Encrypt prompt-builder text and editor state in saved workflows and hide it unless hovered. |
| high_level_description | STRING | Optional one-line overview of the whole image. Blank is omitted. | |
| background | STRING | Scene background description. | |
| style | COMBO | photo | Ideogram structured style block type. |
| photo | STRING | Photo style descriptor used when style is photo. | |
| art_style | STRING | Art style descriptor used when style is art_style. | |
| aesthetics | STRING | Style descriptor emitted when style is not none. | |
| lighting | STRING | Style descriptor emitted when style is not none. | |
| medium | STRING | Style descriptor emitted when style is not none. | |
| import_mode | COMBO | when empty | Use wired import_json always, or only to seed an empty editor. |
| output_format | COMBO | compact | Compact matches the Ideogram 4 training format; pretty is for readability. |
| style_palette_data | STRING | Serialized style color palette managed by the node UI. | |
| elements_data | STRING | Serialized region data managed by the node UI. | |
| bg_brightness | INT | 250–100 | Background image brightness for the preview/editor. |
| coord_mode | COMBO | normalized | BBox coordinate scale for JSON output: normalized 0-1000 grid or absolute pixels. |
| bbox_order | COMBO | yx | BBox axis order for JSON output: yx is Ideogram [ymin,xmin,ymax,xmax], xy is Qwen-style [xmin,ymin,xmax,ymax]. |
| imageopt | IMAGE | Optional reference image shown behind the preview/editor regions. | |
| import_jsonopt | STRING | Optional full caption JSON to import into the editor/output. | |
| bboxesopt | BOUNDING_BOX | Optional pixel-space boxes used to seed editor regions when it has none. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| prompt_builder | AIO_IDEOGRAM4_PROMPT | — |
| prompt | STRING | — |
| preview | IMAGE | — |
| bboxes | BOUNDING_BOX | — |
| width | INT | — |
| height | INT | — |