EmAySee Random String Selector
A coin flip between two prompts, wrapped in a node
- RANDOM_SELECTED_STRING
Two strings in, one random string out. The simplest member of the pack's random-string family: you type string_input_1 and string_input_2, and every run the node flips a coin - random.randint(0, 1) - and returns whichever input won. That's the entire mechanism. It's the "A/B toggle that randomizes" node.
How it works
Just the two string inputs (both with a placeholder default you'll overwrite) and one output, RANDOM_SELECTED_STRING. Wire it into a CLIP Text Encode, a filename prefix, a text combine - anything that takes a string. The flip is unbiased and independent every time the graph runs, so you get a true 50/50 split across a batch.
The missing knob: no seed
There's no seed input and no reproducibility toggle. Every execution rolls fresh from Python's global RNG, so you cannot replay "the same pick" for a given run. For variety that's ideal - no widget fiddling, it just varies. For reproducible experiments it's a non-starter, and that's where the pack's 20-way selector (EmAySee_RandomStringSelector) wins, since it at least takes a seed.
When to use it
- Two competing positive prompts and you want the graph to decide.
- A positive/negative-style choice where you don't want to hard-code which branch runs.
- Any 2-way variation you're tired of toggling by hand.
Honestly, if you only need two options, most bigger utility packs (rgthree-style switches, etc.) will also do this and more. Where this node earns its place is as the minimal, dependency-free version - it's already installed if you have the pack, it's dead simple, and it never gets in the way. It's also the one to grab when you want a 2-way pick and don't want to configure a switch with bypasses and default states.
Installing it
Part of ComfyUI_EmAySee_CustomNodes - install once, get all the nodes. ComfyUI Manager → search ComfyUI_EmAySee_CustomNodes → Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes
# restart ComfyUI
Under EmAySee_Utils. No dependencies.
Bottom line
It's a two-line random choice with a UI around it. Nothing fancy, nothing hidden - which is exactly why it keeps being useful. Want three options? The same pack has the ThreeChoice version, and a FourChoice after that.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| string_input_1 | STRING | Input String 1 | — |
| string_input_2 | STRING | Input String 2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| RANDOM_SELECTED_STRING | STRING | — |