π² Ideogram 4 Random Prompter
Random Ideogram 4 layouts, generated from a dictionary, on demand
- prompt
- preview
- bboxes
- width
- height
Ideogram 4 only really works if you speak its JSON schema - hex palettes, bounding boxes, typed regions. Writing that by hand, every time, is an hour of your life you don't get back. π² Ideogram 4 Random Prompter skips the authoring entirely: it rolls a whole structured caption for you, boxes and all, and hands you the JSON.
It's marked experimental, and the author means it - this is a generator, not a precision tool. But it's genuinely fun and it does a useful job: you get to see what the schema looks like when it's valid, then either keep the roll or hand-edit the good parts in the π§© Ideogram 4 Prompt Builder. Treat it as a slot machine that teaches you the format.
How the randomness works
Every word is pulled live from the wonderwords dictionary - the node's description makes a point of it, nothing is hardcoded - so the vocabulary is broad and English. On top of that it scatters regions across the canvas in four size tiers with independent weights: background_weight, large_weight, medium_weight, small_weight. All four get summed and each region picks a tier proportionally, so setting all of them to 0 falls back to equal weighting, and setting one to 1.0 with the rest at 0 forces the whole composition to one scale. A background block covers at least 70% of the canvas area - it's a base layer. Small elements are ~5-17% per axis.
region_count_min / region_count_max decide how many regions, and the count is a random integer in that range inclusive. Set them equal for a fixed count.
Then the parts that change the character of the output more than any setting:
scene_framing- on, the dictionary words get woven with articles and spatial connectors into one continuous sentence ("a vivid tower beside a hollow stone against an amber cloud"), which tells the model it's a single coherent scene. Off, you get bare word lists per region, and Ideogram will happily render that as a collage or asset sheet of separate objects. If your "photograph" keeps coming out looking like a grid, this is why.freeform_chance- the per-region probability that a region drops its bounding box entirely. Ideogram has no edge-blur control, so an element without a box blends softly into the scene instead of being pinned to a hard rectangle. Turn it up to escape the cut-out look; at 1.0 nothing is boxed and thebboxesoutput is empty.text_region_min/text_region_max- an exact count of regions rendered as in-image text rather than objects.0/0for never,3/3for always exactly three words in the picture.
medium defaults to photograph (which emits a photo style key with focal length and aperture; anything else emits an art_style key). color_palette mirrors the Colorful Starting Image node's palettes - none emits no palette at all and lets Ideogram choose freely. color_harmony, positioning_bias and arrangement control how colours and centres are distributed. word_length_bias and word_length_randomness bias the dictionary words toward a character length, which is a weirdly effective way to shift tone from punchy to ornate.
description_length, description_override, description_prefix and description_background_prefix shape the auto-generated overview and background lines; description_override wins outright and turns off generation for that field.
Outputs
Same shape as the builder: prompt (the caption JSON), preview (rendered regions), bboxes (pixel boxes as {x, y, width, height}, freeform regions excluded), width, height. seed makes any roll reproducible - same seed plus same settings gives you the identical caption, preview and boxes, which is how you go back to the one that worked.
The one thing to try first
The tooltip practically hands you a recipe: for something that reads as an actual photo, use scene_framing on, medium: photograph, a low region count, and high background/large weights. High region counts with tiny boxes and freeform off is how you get a busy collage - which is a great look, just not a photo.
And keep an eye on the token budget downstream. Ideogram 4 caps its caption at 2048 tokens; long descriptions across 25 regions is how you find that ceiling.
Install
ComfyUI Manager β ComfyUI-mnemic-nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/MNeMoNiCuZ/ComfyUI-mnemic-nodes
Restart. This node needs the wonderwords package, which is in the pack's requirements.txt - Manager handles it, but a manual git clone without reinstalling requirements leaves you with a node that fails on the dictionary import. If it won't load, that's what to check first:
python -m pip install wonderwords
You'll also need an Ideogram 4 checkpoint and a JSON-capable prompt path for the output to be good for anything. Remember the model is non-commercial licensed - fine for experiments, worth reading the agreement before you build a business on 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 | The assembled Ideogram 4 caption, as JSON text. |
| preview | IMAGE | Rendered preview of the regions, their text and their palettes. |
| bboxes | BOUNDING_BOX | Region boxes in pixels as {x, y, width, height}, nested one list per frame. Freeform regions are excluded because they have no fixed position. |
| width | INT | Canvas width in pixels, passed through from the input. |
| height | INT | Canvas height in pixels, passed through from the input. |