Nodes/TrentNodes/🀠 Composition Cowboy
ComfyUI Node

🀠 Composition Cowboy

Print layouts without hand-writing Ideogram region JSON

By TrentHunter82Β·Created 9 months agoΒ·Updated 4 days agoΒ· 36
🀠 Composition Cowboy
  • image
  • prompt_json
  • prompt_text
  • preview
  • bboxes
  • out_width
  • out_height
  • preset_name
  • vlm_brief
β—„presetMagazine / Classic Mastheadβ–Ί
β—„select_bynameβ–Ί
β—„poolAllβ–Ί
β—„preset_index0β–Ί
β—„include_bboxestrueβ–Ί
β—„width0β–Ί
β—„height0β–Ί
β—„json_modereplaceβ–Ί
β—„bg_brightness25β–Ί
β—„titleβ–Ί
β—„subtitleβ–Ί
β—„heroβ–Ί
β—„bodyβ–Ί
β—„brandβ–Ί
β—„extraβ–Ί
β—„high_level_descriptionβ–Ί
β—„backgroundβ–Ί
β—„stylenoneβ–Ί
β—„style_detailβ–Ί
β—„aestheticsβ–Ί
β—„lightingβ–Ί
β—„mediumβ–Ί
β—„style_paletteβ–Ί
β—„overrides_jsonβ–Ί
β—„import_jsonβ–Ί
β—„elements_jsonβ–Ί

Making a text-image model render an actual magazine cover - title up top, hero below, caption strip, brand mark - means writing region-aware prompts with precise bounding boxes. Do it by hand and you're typing Ideogram-4 JSON coordinates into a text box and praying. Composition Cowboy does the opposite: it ships curated, design-best-practice layout templates for magazines, comics, books, and posters, and emits the Ideogram-4 caption JSON (plus a plain-language version) ready to wire into a region-aware model. The emoji in the name is earned; this is the pack's most opinionated node.

The preset list is the first thing you'll notice - 18 templates spanning Magazine (Classic Masthead, Fashion Full-Bleed, Minimalist, Newsstand), Comic (4-panel 2x2, 6-panel 2x3, Splash Page, 3-Tier Widescreen, Manga right-to-left), Book (Title Dominant, Author Dominant, Series Branded), and Poster variants. Each preset carries its own region layout, so "magazine masthead" and "comic splash page" produce genuinely different geometry, not cosmetic tweaks.

The selector and iteration

select_by chooses which selector wins: name (the preset dropdown) or index (the preset_index number). The tooltip is specific about the intended trick: set select_by=index, set the preset_index control dropdown to increment, turn on Auto Queue, and the node cycles through every preset in the pool on each run - an automated style sweep across your whole template library. pool scopes which presets the index cycles through (All, Magazine, Comic, Book, Poster, Custom).

What you actually fill in

  • The role slots: title, subtitle, hero, body, brand, extra. Each overrides the matching region in the template - type text for text regions, describe a subject for the hero region.
  • overrides_json - per-region overrides as JSON ({"hero":"...", "2":"..."}), where role keys hit all matching regions and 1-based index keys hit one. This is the socket for a VLM: the node's vlm_brief output literally tells a vision model what to fill in, and you wire the model's JSON back in here. Full loop, no manual region bookkeeping.
  • import_json / elements_json - seed from an existing Ideogram caption JSON, or define your own regions from scratch (Custom / User Defined preset).
  • The KJ-parity style fields: high_level_description, background, style (photo / art_style), style_detail, aesthetics, lighting, medium, style_palette - these mirror KJ's Ideogram 4 Prompt Builder so workflows migrate without losing the style block.
  • include_bboxes - on (default) emits Ideogram-style region bboxes; off gives a coordinate-free prompt for models without a region grid, and an empty bboxes output.

Outputs: prompt_json (wire into KJ's Ideogram 4 Prompt Builder import_json), prompt_text, a preview image with the reference dimmed behind it (bg_brightness), bboxes, out_width/out_height (0 = preset aspect, or your own multiples of 16), preset_name, and vlm_brief.

Install and gotchas

Ships in TrentNodes: ComfyUI Manager (search "Trent Nodes"), or clone + pip install -r requirements.txt. No models - it's a prompt generator, not a generator.

Two things to remember. json_mode (replace/merge) decides how a wired import_json combines with the preset - replace is the predictable default. And width/height of 0 mean "use the preset's aspect," so don't read them as bugs when they come out different from your canvas. If the preview looks off, it's usually bg_brightness (reference dim) rather than the layout - raise it toward 100 to see the regions clearly against a brighter reference.

CategoryTrent/Prompt

Inputs (27)

NameTypeDefaultDescription
presetCOMBOMagazine / Classic MastheadPick a layout template (used when select_by = name).
select_byCOMBOnameWhich selector wins: the 'preset' dropdown (name) or 'preset_index'.
poolCOMBOAllScopes which presets 'preset_index' cycles through.
preset_indexINT00–9999Index into the pool (used when select_by = index). Set the control dropdown to 'increment' and turn on Auto Queue to cycle styles each run. Wraps around the pool.
include_bboxesBOOLEANtrueOn: emit Ideogram-style region bboxes. Off: coordinate-free prompt (for models that don't use a region grid) and empty bboxes output.
widthINT00–163840 = use the preset's aspect; >0 overrides it (multiples of 16).
heightINT00–163840 = use the preset's aspect; >0 overrides it (multiples of 16).
json_modeCOMBOreplaceHow a wired import_json combines with the preset.
bg_brightnessINT250–100Dim the reference image behind the preview (%).
titleoptSTRINGOverride the 'title' regions (text = words shown; obj = subject).
subtitleoptSTRINGβ€”
herooptSTRINGOverride the 'hero' / main-subject regions.
bodyoptSTRINGβ€”
brandoptSTRINGβ€”
extraoptSTRINGβ€”
high_level_descriptionoptSTRINGOne-line overview of the whole image (KJ parity). Blank = auto from the preset.
backgroundoptSTRINGScene / background description (KJ parity). Blank = the preset's built-in background.
styleoptCOMBOnoneEmit an Ideogram style_description block (KJ parity). 'none' omits it entirely.
style_detailoptSTRINGThe 'photo' text (camera/film/lens) or the 'art_style' text, per the style selector.
aestheticsoptSTRINGstyle_description.aesthetics (used only when style != none).
lightingoptSTRINGstyle_description.lighting (used only when style != none).
mediumoptSTRINGstyle_description.medium (used only when style != none).
style_paletteoptSTRINGGlobal style colors as hex, e.g. '#1A1A1A, #E0C080'. Added to style_description.color_palette.
overrides_jsonoptSTRINGPer-region overrides as JSON, e.g. {"hero":"...","2":"..."}. Role keys hit all matching regions; 1-based index keys hit one. Wire your VLM node's JSON output here (convert to input).
import_jsonoptSTRINGA full Ideogram-4 caption JSON to seed from (e.g. from KJ's editor or a VLM). Combined per json_mode. Convert to input to wire it.
elements_jsonoptSTRINGDefine your own regions as a JSON list, e.g. [{"type":"text","x":0.1,"y":0.1,"w":0.8,"h":0.1,"text":"HELLO"}]. Appended to the active preset's regions β€” pick the 'Custom / User Defined' preset to start from an empty page. Each region takes x/y/w/h as 0-1 fractions, or a KJ-style bbox [ymin,xmin,ymax,xmax] on a 0-1000 grid; plus optional type/text/desc/palette/role.
imageoptIMAGEOptional reference image shown behind the preview.

Outputs (8)

NameTypeDescription
prompt_jsonSTRINGβ€”
prompt_textSTRINGβ€”
previewIMAGEβ€”
bboxesBOUNDING_BOXβ€”
out_widthINTβ€”
out_heightINTβ€”
preset_nameSTRINGβ€”
vlm_briefSTRINGβ€”