Prompt Line Pick (Oli)
Random prompts without the weird repeats
- optional_prompt_list
- prompts_in
- STRING
- COMBO
- prompt_list
- prompt_strings
- seed
Paste ten prompt ideas into a box, and Prompt Line Pick (Oli) chooses one every run - then hands you the same seed that made the choice, so you can wire it to the KSampler and reproduce exactly what the picker picked. That's the whole pitch, and it fixes something you've probably felt with the usual prompt randomizers: the same two or three lines coming up again and again, or two pickers walking their lists in lockstep.
It's a reimplementation of easy promptLine from ComfyUI-Easy-Use, with one deliberate change. Instead of a start_index you give it a seed, the same kind of seed your KSampler uses. That swap is what makes it feel better in practice.
How the picking works
The index comes from sha256(seed:node_id) % len(lines) - a hash of your seed plus this node's own ID, modulo the number of lines. Two consequences worth knowing:
- Uniform distribution. Every line has an equal chance, no matter how many lines you've got.
- Independence between pickers. Because your node's ID is part of the hash, two pickers fed the same seed still land on unrelated positions. With easy promptLine, two lists of the same length - or lengths that are multiples of each other, like 5 and 10 - walk their lines in lockstep. Here they can't.
You get the first for free; the second is why "I used the same seed on two pickers and they chose the same style" doesn't happen. If you actually want easy promptLine's old behavior - index = seed % len - flip uncorrelate off.
The inputs that matter
- prompt - one candidate per line. This is the only thing you'll really edit.
remove_empty_lines(on by default) strips blank lines before picking. - seed - share it with your KSampler and the pick becomes part of your reproducible seed. The node also passes the seed out its own
seedoutput so you can chain pickers without routing back. - uncorrelate - on by default; turn off for easy promptLine-style index mapping.
- optional_prompt_list / prompts_in - feed in an accumulated list from an upstream picker, and the node appends its pick and returns the extended list. Chain several pickers, then hand the result to easy promptList or a Mega String List. That's the stacking story: each picker is one slot in a growing prompt list.
The outputs
STRING is the single picked line as a scalar - wire it anywhere you'd wire a prompt. COMBO is the same line in list form, and it's the interesting one: it's compatible with COMBO-typed inputs like SDXL Prompt Styler's artist or style dropdowns, which normally reject anything that isn't their exact option list. The node fakes that type check (a standard ComfyUI trick) so your picked line lands in the styler without validation errors. prompt_list and prompt_strings are the accumulated list for chaining; seed passes your seed through.
Install & gotchas
Install via ComfyUI Manager (search Oli Prompt Tools) or:
cd ComfyUI/custom_nodes
git clone https://github.com/magicoli/comfyui-oli-prompt-tools
Restart ComfyUI. No extra dependencies - the whole pack is plain Python on top of stock ComfyUI.
One honest caveat: "independent random picks" means a line can repeat twice in a row, or two pickers can land on the same line. That's just how randomness works, and the uniformity argument says it balances out over runs. If you need guaranteed rotation - every line once before any repeats - this isn't that node. If you want honest variety with reproducible seeds, it's the one I'd grab.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | prompt 1 prompt 2 prompt3 | — |
| seed | INT | 00–18446744073709550000 | — |
| remove_empty_lines | BOOLEAN | true | — |
| uncorrelate | BOOLEAN | true | When on, index = sha256(seed:node_id) % len — each node instance picks independently even with the same seed, avoiding correlation between lists of the same or multiple lengths. When off, index = seed % len — standard index behavior which could result in correlated picks between similar-length lists. |
| optional_prompt_listopt | LIST | — | |
| prompts_inopt | LIST | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |
| COMBO | COMBO | — |
| prompt_list | LIST | — |
| prompt_strings | STRING | — |
| seed | INT | — |