A simple text randomizer for ComfyUI that can generate random and surprising results
<sub>About | Custom nodes | Workflows | Tips</sub>
A simple text randomizer for ComfyUI that can generate random and surprising results.
<sub>About | Custom nodes | Workflows | Tips</sub>
The Text Randomizer node randomizes text placed between brackets. Options should be separated by |
, and any text outside the brackets remains unchanged.
Example:
Input text: [man|girl], sitting on a [bench|grass]
.
Possible outcomes:
Note: You can nest brackets to create more varied outcomes.
Similar to Text Randomizer
, but it displays a warning if brackets or parentheses are mismatched. This check happens in real time, so you don’t need to run the workflow to see the errors.
Note: The check works separately for brackets and parentheses. For example, input like [ ( ] )
will pass the check.
Returns one of two text options at random.
Joins two pieces of text, adding ,
between them.
Displays the final text you’ve generated. This is useful for debugging your prompts and checking what is fed into the TextEncoder.
<sub>About | Custom nodes | Workflows | Tips</sub>
You can find example workflows in the /workflows
folder.
Demonstrates how to achieve similar text outputs in different ways, either by grouping separate topics and concatenating texts or putting everything into one node.
Shows how to randomize two text nodes and return text from either one node or another.
<sub>About | Custom nodes | Workflows | Tips</sub>
You can use Text Randomizer with Check
as a simple tool to check brackets without connecting it to anything. Just paste your text inside to see if your brackets or parentheses match.
By adding |
at the end of the expression, you can create an empty option. For example (spaces added for clarity): [ apple | banana | grapefruit | orange | ]
gives an equal chance to select "apple," "banana," "grapefruit," "orange," or nothing.
Other examples: