2🐕Text random splicing
Random-pick and join up to five text snippets
- concatenated_text
If you've ever wanted a lightweight wildcard system without setting up a whole wildcard file, this is roughly that. Text random splicing takes up to five separate text boxes and randomly selects and joins them into one output string, reseeded run to run. Think five slots for "subject," "pose," "lighting," "style," "quirk" - fill in a few options in each, and let the seed decide which combination you get this time, instead of you manually swapping prompt fragments between generations.
How it works
You get five optional multiline text fields, text1 through text5. Whatever's filled in gets considered for the splice; leave any of them blank and they're simply not part of the pool. Splicing_Characters is the separator dropped between the pieces that get joined (a comma-space, a newline, whatever you type). Exclude_Characters strips individual characters from the final result, and Exclude_words strips whole words or phrases - handy for cleaning up stray punctuation or a placeholder word you don't want leaking into the output. seed drives the randomness: same seed, same selection, which means you can lock in a combination you liked and reproduce it exactly, or bump the seed for a fresh mix. The single output is concatenated_text - a plain STRING, ready to feed straight into a prompt input.
What to actually set
In practice you'll touch three things: fill in the text slots you want in the rotation, set a Splicing_Characters separator that matches how your prompt is structured, and treat seed the way you'd treat a KSampler seed - fix it once you like a result, randomize it when you want variety.
Installing it
ComfyUI Manager: search "Comfyui-ergouzi-Nodes", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/11dogzi/Comfyui-ergouzi-Nodes.git
then restart ComfyUI. Pure text processing, no models, no external dependencies to worry about. Worth knowing regardless of which node in the pack you're using: the author's English repo isn't the actively developed one anymore - new work goes into a separate Chinese-first sibling pack, so treat this as stable rather than current.
Common issues & troubleshooting
Output looks empty or oddly short. Check that at least one of text1-text5 actually has content - an all-blank set of slots just produces an empty (or near-empty) join, which looks like a bug but is really just nothing to splice.
The same combination keeps showing up. With a fixed seed, that's expected - it's deterministic by design. If you want variety run to run, randomize the seed the same way you would for sampling.
Words are vanishing that you didn't mean to strip. Exclude_words matches whatever string you gave it exactly, including as a substring of longer words in some implementations of this kind of filter - if a common short word is disappearing from the middle of a longer phrase, that's the likely cause; narrow the exclude term or move that content into a slot you don't filter.
If you don't actually need the randomness - you just want a clean, deterministic join of whatever slots are filled - the pack's sibling node, Text arbitrary splicing, does the same joining without the seed.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| text1opt | STRING | — | |
| text2opt | STRING | — | |
| text3opt | STRING | — | |
| text4opt | STRING | — | |
| text5opt | STRING | — | |
| Splicing_Charactersopt | STRING | — | |
| Exclude_Charactersopt | STRING | — | |
| Exclude_wordsopt | STRING | — | |
| seedopt | INT | 0-1125899906842624–1125899906842624 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| concatenated_text | STRING | — |