π² Ideogram 4 Random Prompter
Rolling the dice on Ideogram 4's JSON prompt format
- prompt
- preview
- bboxes
- width
- height
Ideogram 4 doesn't take a normal free-text prompt - it wants a structured JSON scene description, which is a genuinely unusual prompting interface compared to almost every other image model in circulation. This node is a dice roller built specifically for that format: it pulls real English words live from the wonderwords dictionary package (the author is explicit that nothing is hardcoded), scatters them into weighted regions across the canvas, and assembles a valid Ideogram-4-style JSON caption you can send straight into the model. It's marked experimental, and it should be - you're not going to get a masterpiece every roll, but as a "give me ten weird compositions to look at" button, it's genuinely useful.
How it works
Every region on the canvas falls into one of four size tiers - background, large, medium, small - each with its own relative weight, so you control roughly how busy and layered the scene is. Each region gets filled with a random run of dictionary words, either as a bare list (scene_framing off, more of a collage/asset-sheet look) or woven into an actual sentence with articles and spatial connectors like "beside" and "against" (scene_framing on, which reads as one coherent scene rather than a grid of separate objects). Everything is seeded, so the same seed plus the same settings always reproduces the exact same composition - useful for iterating on one roll instead of gambling blind every time.
The inputs and outputs that matter
seed- locks the whole roll. Change it for a new composition, keep it fixed to tweak other settings against the same layout.width/height- canvas size; Ideogram 4 prefers multiples of 16.region_count_min/region_count_max- how many elements end up in the scene. Low numbers give a sparse composition; high numbers give a dense, busy one.medium-photograph(default),illustration,3d_render,painting,graphic_design, orrandom. This changes which schema keys get emitted -photographadds camera-style detail (focal length, aperture), everything else adds an art-style key instead.scene_framing- the single biggest lever on whether the result reads as one photo or a scattered collage.color_palette- defaults tonone(Ideogram picks freely); set it to get a themed palette applied.
There's a deeper layer of tuning - background_weight/large_weight/medium_weight/small_weight for region-size distribution, word_length_bias, freeform_chance, text_region_min/max for in-image text, positioning_bias/arrangement for layout - worth exploring once you've got a feel for the basics, and the two optional description fields (description_override, description_prefix) let you lock or steer the overview line instead of leaving it fully random.
Outputs: prompt (the JSON string, feed this to your Ideogram 4 node), preview (an IMAGE showing the bounding-box layout so you can eyeball the composition before spending an API call on it), bboxes, width, height.
How to install it
Via ComfyUI Manager: search ComfyUI-mnemic-nodes, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/MNeMoNiCuZ/ComfyUI-mnemic-nodes
This node specifically needs the wonderwords Python package - the pack's own description flags it as a requirement. It should install with the pack's other dependencies, but if you see an import error tied to it, pip install wonderwords into the same Python environment ComfyUI is running in fixes it.
Common issues & troubleshooting
The generated scenes are nonsense half the time. That's expected, not a bug - this is a random word generator wearing a JSON schema, not a language model with any sense of coherence. Use it to shake loose ideas or generate a batch of layouts to skim, not as a one-shot reliable prompter.
Ideogram 4 rejects or refuses a generated prompt. Ideogram 4 has a content filter trained directly into the model, and this node has no awareness of what will or won't trip it - a refusal on the model's side isn't something this node can predict or prevent.
Prefer hand-built layouts? The pack also ships Ideogram 4 Prompt Builder (adapted from kijai's ComfyUI-KJNodes), a visual bounding-box editor for the same schema - reach for that when you want to design the composition yourself instead of rolling for it.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00β18446744073709550000 | Random seed for the whole generation. The same seed + the same settings always produce the exact same caption, preview and bounding boxes. Change the seed to roll a brand-new random composition without touching any other setting. Example: seed 0 and seed 1 give two completely different layouts; seed 0 run twice gives identical output. |
| width | INT | 102464β16384 | Canvas width in pixels. Sets the output aspect ratio and the pixel grid the bounding boxes are measured against. Ideogram 4 prefers multiples of 16. Example: width 1344 with height 768 gives a wide 16:9-ish landscape; 1024 x 1024 is a square. |
| height | INT | 102464β16384 | Canvas height in pixels. Sets the output aspect ratio and the pixel grid the bounding boxes are measured against. Ideogram 4 prefers multiples of 16. Example: height 1344 with width 768 gives a tall portrait. |
| region_count_min | INT | 101β64 | Minimum number of element regions to generate. The actual region count is a random integer between min and max (inclusive). This is the EXACT number of elements that end up in the caption and the preview (freeform / box-less regions are now drawn dashed in the preview, so the visible count always matches). Example: min 10, max 25 -> somewhere from 10 to 25 regions. Set min = max for a fixed count (e.g. 12 and 12 = always 12). |
| region_count_max | INT | 201β64 | Maximum number of element regions to generate. The actual region count is a random integer between min and max (inclusive). Example: min 1, max 5 -> a sparse scene of 1 to 5 elements; min 30, max 40 -> a dense, busy collage. |
| background_weight | FLOAT | 0.400β1 | Relative likelihood that any given region is a BACKGROUND-tier block. Background blocks are huge: each one covers at least 70% of the canvas AREA (often the whole frame), acting as a base layer behind everything else. All four tier weights (background / large / medium / small) are summed and each region picks a tier proportionally. Set all four to 0 to fall back to equal weighting. Example: weights 0.3 / 0 / 0 / 0.7 -> roughly 30% giant backgrounds, 70% tiny details, nothing in between. |
| large_weight | FLOAT | 0.600β1 | Relative likelihood that a region is a LARGE-detail element (~34-62% of the canvas per axis). Weighted against the other three tiers. Set to 0 to forbid large elements entirely. Example: large 1.0 with everything else 0 -> every element is big. |
| medium_weight | FLOAT | 0.400β1 | Relative likelihood that a region is a MEDIUM-detail element (~17-40% of the canvas per axis). Weighted against the other three tiers. Set to 0 to forbid medium elements. Example: medium 1.0, all others 0 -> a uniform field of mid-size shapes. |
| small_weight | FLOAT | 0.200β1 | Relative likelihood that a region is a SMALL-detail element (~5-17% of the canvas per axis). Weighted against the other three tiers. Set to 0 to forbid small elements. Example: small 1.0, all others 0 -> only tiny scattered details (a confetti / texture look). |
| word_length_bias | INT | 00β18 | Preferred dictionary word length, in characters. 0 = no preference (a natural mix of short and long words). Any value above 0 biases every picked word toward that length. Example: 4 favours short punchy words (e.g. 'wide', 'calm'); 11 favours long ornate words (e.g. 'melancholic'). |
| word_length_randomness | INT | 20β18 | Spread (in characters) around 'word_length_bias'. Words are drawn from the window [bias - this, bias + this]. Larger = looser mix; 0 = words of exactly the bias length. Ignored when word_length_bias is 0. Example: bias 8, randomness 2 -> words 6-10 characters long. |
| scene_framing | BOOLEAN | true | OFF (pure): each region's description is a bare list of dictionary words, e.g. 'vivid tower, hollow stone.' Maximum randomness, but Ideogram tends to render this as a COLLAGE / asset sheet of separate items. ON (scene): the same dictionary words are woven together with articles and spatial connector words (beside / near / behind / against ...) into one continuous sentence, e.g. 'a vivid tower beside a hollow stone against an amber cloud.' This tells Ideogram it is ONE coherent scene, so 'photograph' actually looks like a photograph instead of a grid. The connector / article words are structural and do NOT count toward region_word_min/max. Tip: for a real photo use scene ON + medium 'photograph' + a low region count + large boxes (high background/large weight). |
| region_word_min | INT | 51β200 | Minimum number of randomized CONTENT words (adjectives + nouns from the dictionary) in each region's description. The exact count per region is a random integer between region_word_min and region_word_max (inclusive). Binder words (articles / connectors added by scene_framing) are NOT counted. Set min = max for an exact count: e.g. min 20, max 20 -> every region has exactly 20 content words. |
| region_word_max | INT | 151β200 | Maximum number of randomized CONTENT words in each region's description. The exact count per region is a random integer between region_word_min and region_word_max (inclusive). Binder words are NOT counted. Example: min 5, max 20 -> each region gets 5-20 content words; min 20, max 20 -> exactly 20 every time. |
| freeform_chance | FLOAT | 0.000β1 | Per-region chance that a region drops its hard bounding box and becomes a FREEFORM element. Ideogram has no edge-blur control. An element WITHOUT a bbox is blended softly into the scene instead of being pinned to a hard rectangle, so higher values give a less 'cut-out collage' look. Freeform regions are still counted and are drawn dashed in the preview, but they are excluded from the bbox output (they have no fixed location). Example: 0.0 -> every element keeps a hard box; 1.0 -> nothing is boxed (fully painterly, empty bbox output). |
| text_region_min | INT | 00β64 | Minimum number of regions rendered as in-image TEXT (a real dictionary word drawn into the picture) instead of an object. The text count is a random integer between text_region_min and text_region_max (inclusive), then clamped so it never exceeds the total region count. This is an EXACT count, not a probability. Example: min 1, max 2 -> always 1 or 2 text words in the image, no matter how many total regions there are. |
| text_region_max | INT | 20β64 | Maximum number of regions rendered as in-image TEXT. The text count is a random integer between text_region_min and text_region_max (inclusive), clamped to the total region count. Example: min 0, max 0 -> never any text; min 3, max 3 -> always exactly 3 text words. |
| element_palette_chance | FLOAT | 0.000β1 | Per-region chance that a region carries its OWN small colour palette (a subset of the image-level palette) instead of inheriting the global one. Has no effect when color_palette is 'none'. Example: 0.0 -> all elements share the image palette; 1.0 -> every element gets its own colour sub-set. |
| medium | COMBO | photograph | Image medium (an Ideogram 4 schema value). 'photograph' emits a 'photo' style key (focal length / aperture); every other medium emits an 'art_style' key instead. 'random' picks one per run. Example: 'photograph' -> camera-style caption; 'painting' -> art-style caption. |
| color_palette | COMBO | none | Colour palette family used to build the image palette (mirrors the Colorful Starting Image node). - none: emit NO colour palette at all (Ideogram chooses colours freely) - random_color: any RGB - muted / grayscale / binary / neon / pastel: themed colours - colorized: grayscale tinted with one shared hue - random: pick one of the families above per run Example: 'none' -> no color_palette keys anywhere; 'neon' -> vivid saturated swatches. |
| color_harmony | COMBO | none | Colour-harmony rule applied to the generated palette. - none: unrelated colours - complementary: two opposite hues - analogous: neighbouring hues - triadic: three evenly spaced hues - tetradic: four evenly spaced hues - random: pick one per run Ignored when color_palette is 'none'. Example: 'complementary' -> a punchy two-colour contrast scheme. |
| positioning_bias | COMBO | Where regions tend to cluster on the canvas (mirrors the Colorful Starting Image node). scattered = anywhere; center_weighted / edge_weighted; grid_aligned; random_weighted; or a compass direction (north / south / east / west and the diagonals). Ignored when 'arrangement' is anything other than 'none'. Example: 'south' -> elements gather along the bottom; 'center_weighted' -> a tight central cluster. | |
| arrangement | COMBO | none | Structured placement pattern for region centres. - none: use positioning_bias instead (default) - spiral: centres wind outward in a spiral - burst: centres explode out from the middle - grid: centres snap to a tidy grid - random: pick one per run Overrides positioning_bias whenever it is not 'none'. Example: 'grid' -> an orderly tiled layout; 'burst' -> an energetic radial spray. |
| description_lengthopt | INT | 351β200 | Target length (in words) for the AUTO-GENERATED high_level_description. The generator keeps adding dictionary word-groups until it reaches about this many words, so larger = a longer, richer overview line. Ignored when description_override is set. Example: 6 -> a short caption; 30 -> a long, dense descriptive run. |
| description_overrideopt | STRING | FULL REPLACEMENT for the high_level_description. When this is non-empty, the high_level_description is set to EXACTLY this string and nothing is generated for it (description_prefix and description_length are ignored). Leave blank to auto-generate. Example: 'A wide cinematic establishing shot of a coastal town at dawn' -> that exact line is used verbatim. | |
| description_prefixopt | STRING | A close-up photography of | PREFIX prepended to the auto-generated high_level_description. Ignored when description_override is set. The final value is '<prefix> <generated words>'. Example: prefix 'A vintage 35mm photograph of' -> 'A vintage 35mm photograph of amber hollow river, brisk stone, ...' |
| description_background_prefixopt | STRING | an environment photography background of | PREFIX prepended to the auto-generated background description. The final value is '<prefix> <generated words>'. Leave blank to let the background be fully random. Example: 'a serene mountain landscape with' -> 'a serene mountain landscape with vivid hollow stone ...' |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | β |
| preview | IMAGE | β |
| bboxes | BOUNDING_BOX | β |
| width | INT | β |
| height | INT | β |