π€ Composition Cowboy
Print layouts without hand-writing Ideogram region JSON
- image
- prompt_json
- prompt_text
- preview
- bboxes
- out_width
- out_height
- preset_name
- vlm_brief
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'svlm_briefoutput 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 Definedpreset).- 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 emptybboxesoutput.
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.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | Magazine / Classic Masthead | Pick a layout template (used when select_by = name). |
| select_by | COMBO | name | Which selector wins: the 'preset' dropdown (name) or 'preset_index'. |
| pool | COMBO | All | Scopes which presets 'preset_index' cycles through. |
| preset_index | INT | 00β9999 | Index 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_bboxes | BOOLEAN | true | On: emit Ideogram-style region bboxes. Off: coordinate-free prompt (for models that don't use a region grid) and empty bboxes output. |
| width | INT | 00β16384 | 0 = use the preset's aspect; >0 overrides it (multiples of 16). |
| height | INT | 00β16384 | 0 = use the preset's aspect; >0 overrides it (multiples of 16). |
| json_mode | COMBO | replace | How a wired import_json combines with the preset. |
| bg_brightness | INT | 250β100 | Dim the reference image behind the preview (%). |
| titleopt | STRING | Override the 'title' regions (text = words shown; obj = subject). | |
| subtitleopt | STRING | β | |
| heroopt | STRING | Override the 'hero' / main-subject regions. | |
| bodyopt | STRING | β | |
| brandopt | STRING | β | |
| extraopt | STRING | β | |
| high_level_descriptionopt | STRING | One-line overview of the whole image (KJ parity). Blank = auto from the preset. | |
| backgroundopt | STRING | Scene / background description (KJ parity). Blank = the preset's built-in background. | |
| styleopt | COMBO | none | Emit an Ideogram style_description block (KJ parity). 'none' omits it entirely. |
| style_detailopt | STRING | The 'photo' text (camera/film/lens) or the 'art_style' text, per the style selector. | |
| aestheticsopt | STRING | style_description.aesthetics (used only when style != none). | |
| lightingopt | STRING | style_description.lighting (used only when style != none). | |
| mediumopt | STRING | style_description.medium (used only when style != none). | |
| style_paletteopt | STRING | Global style colors as hex, e.g. '#1A1A1A, #E0C080'. Added to style_description.color_palette. | |
| overrides_jsonopt | STRING | Per-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_jsonopt | STRING | A 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_jsonopt | STRING | Define 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. | |
| imageopt | IMAGE | Optional reference image shown behind the preview. |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| prompt_json | STRING | β |
| prompt_text | STRING | β |
| preview | IMAGE | β |
| bboxes | BOUNDING_BOX | β |
| out_width | INT | β |
| out_height | INT | β |
| preset_name | STRING | β |
| vlm_brief | STRING | β |