Picker (dynamic) π Just Nodes
Pick a prompt, any prompt β the switcher that grows as you connect it
- STRING
Picker (dynamic) is the node you build an A/B test or a rotation schedule with. You connect up to twenty text sources and it hands you back exactly one: either the slot you chose, or a random line from one of them. It's the ComfyUI-native version of the wildcard file habit - "collect prompt elements, have a variance" - except instead of a __folder/*__ string in your prompt, you pick the inputs explicitly, on the graph.
Two levels of selection are going on, and the second one trips people up. First, select (0β19) chooses which connected input to read from. Then, if the chosen input's text is multi-line, line chooses which line within it. So a single input slot can hold a whole list of alternative prompts, one per line, and you can flip through them. Set mode to random and the seed decides: seed % num_lines picks the line, which means the same seed always gives the same pick - handy when you're hunting for that one variant that looked great and want to reproduce it.
The neat part is the dynamic inputs. text_1 through text_20 are optional and marked forceInput, so they only appear on the node as you wire things into them. No twenty empty text boxes cluttering your canvas from the moment you add it. select clamps to the number of connected slots, not the widget count, so an unconnected text_7 doesn't leave a hole - the index just skips it.
The output is a single STRING, ready to feed a CLIP Text Encode, a Prompt Stack, or straight into the next node. This is the classic use: three or four prompt variants on text_1βtext_4, a random seed, and you're sampling the space of ideas instead of hand-editing and re-running one prompt at a time.
Wiring it into a loop
Where this gets properly dangerous is combined with the pack's Batch Stepper. Feed the stepper's select INT into the Picker's select and you get a hands-off rotation: prompt 1 for N runs, prompt 2 for N runs, and so on. That's the batch-variation workflow people build multi-node chains for, here in two nodes.
Installing it
Same as every node in this pack - ComfyUI Manager, search "Just Nodes", install, restart. Or cd ComfyUI/custom_nodes && git clone https://github.com/Arroz-11/ComfyUI-Just-Nodes.git. No models, no extra dependencies, MIT licensed.
Gotchas
selectpicks connected slots, not widget numbers. If you wiretext_3beforetext_1, the order is whatever order you connected them in.- Random mode is line-based, not slot-based. It picks a line from the currently-selected slot; it does not randomize which slot. Randomize the slot with a random
selectfrom elsewhere (or therandommode of Labeled Index). - Blank lines inside an input are stripped before counting, so a trailing newline doesn't secretly consume a line number.
If you only ever need a fixed number of slots, the pack also ships Picker x1 / x3 / x6 / x9 / x12 - same logic, hard-wired counts, slightly less to look at. For everything else, the dynamic one is the one to grab.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| select | INT | 00β19 | β |
| mode | COMBO | 2 options: manual, random | |
| line | INT | 0 | β |
| seed | INT | 00β18446744073709550000 | β |
| text_1opt | STRING | β | |
| text_2opt | STRING | β | |
| text_3opt | STRING | β | |
| text_4opt | STRING | β | |
| text_5opt | STRING | β | |
| text_6opt | STRING | β | |
| text_7opt | STRING | β | |
| text_8opt | STRING | β | |
| text_9opt | STRING | β | |
| text_10opt | STRING | β | |
| text_11opt | STRING | β | |
| text_12opt | STRING | β | |
| text_13opt | STRING | β | |
| text_14opt | STRING | β | |
| text_15opt | STRING | β | |
| text_16opt | STRING | β | |
| text_17opt | STRING | β | |
| text_18opt | STRING | β | |
| text_19opt | STRING | β | |
| text_20opt | STRING | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | β |