🔢 Pick Random Prompt from Prompt Combinator
One random prompt from your curated list, whenever you hit the button
- combination_ids
- prompt
- combination_id
- filename
Sometimes you don't want every combination - you want one good one, and you want it picked for you. That's the whole job of this node: feed it a Prompt Combinator's output and it hands back a single random prompt, along with the matching combination id and filename. It was the last node added to the pack (June 2024), and it's the one you reach for when you want the surprise of the {this|that} bracket trick but from a curated list of full prompts rather than random word-swaps.
The contrast is worth spelling out. The bracket trick rolls the dice on one option from each position, every run, and you don't see the alternatives. This node rolls the dice on a whole hand-built prompt at once. Want a "mood generator" where every render is one of twelve hand-tuned prompts you actually trust? That's this node.
How it works
The inputs are the outputs of a Prompt Combinator, wired in as-is:
- prompts - the STRING list.
- combination_ids - the matching id list, so the chosen prompt keeps its label.
- seed - an INT input, and here's the part worth knowing before you rely on it: the code doesn't actually use it. The node picks via Python's unseeded
random.randint, so no matter what you set the seed to, each execution draws fresh from the module's global state. In practice that means the pick changes every run and you can't reproduce a specific one by fixing the seed - which is usually what you want from a node named "pick random," but if you were hoping for deterministic rollouts, this isn't the node.
It's marked as an output node, and it returns three single values (not lists, this time):
- prompt - the chosen string, ready for a CLIP Text Encode.
- combination_id - the id of the picked combination, so downstream filename handling stays honest.
- filename - the dash-joined id, for a Save Image prefix.
Because it's an output node, its results show up in the UI's output panel, which makes it handy for poking at a combinator's output before you commit to rendering the whole matrix - you can ask it "what's in here?" one sample at a time.
Gotchas
One assert to respect: the number of combination ids must equal the number of prompts. That's guaranteed if you feed it straight from a Prompt Combinator and falls apart if you hand-build lists and forget an id. Also note the same wildcard caveat that applies to the whole pack - this node does not process {a|b} syntax; the picked prompt goes out verbatim.
Install
Same one-line story as every node in this pack - ComfyUI-Manager (search "ComfyUI-Prompt-Combinator") or:
cd ComfyUI/custom_nodes
git clone https://github.com/lquesada/ComfyUI-Prompt-Combinator.git
Restart ComfyUI. No models, no pip deps. And the usual pack-level reminder: CC BY-NC-SA 3.0 license, so it's for personal and non-commercial use.
Honest verdict: for most people, the base Prompt Combinator is the reason to install this pack, and this node is a nice extra for mood-board-style workflows. It's lightweight, does exactly one thing, and the fake seed is the only thing that'll catch you off guard.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompts | STRING | — | |
| combination_ids | PROMPTCOMBINATORIDS | — | |
| seed | INT | 00–18446744073709550000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| combination_id | PROMPTCOMBINATORIDS | — |
| filename | STRING | — |