Seed Based Output Selector
Picking one of up to 10 strings, tied to a seed
- final_output
Straight from the README: this node selects one string out of up to 10 inputs, based on a seed - only the inputs you've actually connected (non-None) are considered, and the seed picks among them by modulo. In plain terms: wire up however many prompt variants you want (2, 5, 10, doesn't matter), and the node deterministically rotates through just the ones you connected as seed_number changes.
Why you'd reach for it. The obvious use is A/B/C-testing prompt phrasing across a batch without hand-editing text between runs - wire three or four different subject descriptions into input_1 through input_4, tie seed_number to your batch index or your image seed, and each generation in the batch gets a different, reproducible variant. It's a lighter-weight alternative to wildcard syntax when your options are full sentences rather than single words, and you want each option laid out explicitly rather than crammed into {a|b|c} braces.
Inputs and output. seed_number (INT, required) is the selector. input_1 through input_10 (all optional STRING, default null) are your candidate strings - leave as many unconnected as you like; the node only considers the ones with a value. Output is a single final_output - the chosen string, ready to feed into a CLIPTextEncode or wherever your prompt normally lands.
The mechanism detail worth internalizing. Because it skips unconnected inputs when computing the modulo, connecting 3 of the 10 sockets means the selection cycles through those 3, not through 10 slots with 7 empty gaps. That's the sane behavior, but it also means the number of inputs you wire changes how sensitive the selection is to seed_number - with only 2 or 3 connected, a wide range of seed values collapses onto the same handful of picks, which is expected, not a bug; if you want more visible variety, connect more inputs.
Installing it. No external dependencies - pure string selection logic. Search "comfyui_gr85" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/veighnsche/comfyui_gr85
Restart ComfyUI.
One genuinely easy mistake. seed_number is its own separate socket, entirely independent from whatever seed you feed your KSampler. If you want the prompt-variant selection to move in lockstep with your image's randomness - so seed 42 always gets both the same picked prompt and the same generated image - you have to wire the same seed value into both explicitly. Nothing links them automatically, and it's an easy thing to assume works out of the box until you notice your prompt selection isn't changing while your image seed is.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| seed_number | INT | 0 | — |
| input_1opt | STRING | — | |
| input_2opt | STRING | — | |
| input_3opt | STRING | — | |
| input_4opt | STRING | — | |
| input_5opt | STRING | — | |
| input_6opt | STRING | — | |
| input_7opt | STRING | — | |
| input_8opt | STRING | — | |
| input_9opt | STRING | — | |
| input_10opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| final_output | STRING | — |