Nodes/ComfyUI-Ideogram4-Luna/Ideogram 4 Prompt Builder (Luna)
ComfyUI Node

Ideogram 4 Prompt Builder (Luna)

Visual prompt builder for Ideogram 4's structured JSON caption format. Drag on the canvas to draw regions; select a region to set its type (obj/text), description, text, and color palette. Set the background and optional style fields as widgets. Outputs the assembled caption JSON string. bbox is normalized to a 0-1000 grid as [ymin, xmin, ymax, xmax]; width/height set the canvas aspect ratio. Canvas controls: - Drag: draw a new region - Ctrl/Cmd-drag: force-draw a new region even on top of an existing one - Click: select a region · Alt-click: cycle overlapping regions - Double-click: edit the description inline - Right-click: region list (select / delete / duplicate / reorder, top = front) - Del / Backspace: remove the selected region - Ctrl/Cmd + C / V / D: copy / paste / duplicate the selected region - bbox fields (px / out) next to obj/text are editable Color swatches: - Click: edit · Drag: reorder · Right-click: remove - Hover + Ctrl/Cmd + C / V: copy / paste the hex - "+": add a color (uses the clipboard color if it is one) Toolbar: - Live: use the live sampling preview as the background (and grab the final result) - Grab BG / Clear BG: use the last generated image as the background - brightness slider, token estimate, and Copy / Paste / Clear all

By lunaaispace-eng·Created 2 months ago·Updated 2 months ago· 0
Ideogram 4 Prompt Builder (Luna)
  • 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
import_json
verbatim_passthroughfalse
require_labelsfalse
pause_for_editfalse
pause_timeout0
CategoryLuna/Ideogram

Inputs (20)

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).
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'.
verbatim_passthroughoptBOOLEANfalseWhen a JSON is wired to import_json, output it EXACTLY as received (preserves structure, key order, and any fields the editor doesn't model). The editor still loads it for viewing. Turn off to let the editor drive output.
require_labelsoptBOOLEANfalseBlock the run if any region has no description, so an unlabeled box can't reach Ideogram.
pause_for_editoptBOOLEANfalseHalt the workflow at this node so you can edit the layout, then click Continue to resume. Off = run straight through.
pause_timeoutoptINT00–86400Seconds to wait while paused before auto-continuing. 0 = wait forever.
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