ComfyUI Node
Prompt Randomizer
Randomizes text prompts using pattern replacement with dictionary support, validation, and flexible text processing options. Can generate multiple prompts for batch processing.
Prompt Randomizer
- modified_prompts
- selections
- used_seed
◄prompt?color? ?dog|cat? with ?orange|black? dots on the ?couch|floor?►
◄dictionary_filenameprompt_dictionary.json►
◄seed-1►
◄preserve_newlinesfalse►
◄clean_texttrue►
◄prompts_count1►
Categorypirog/text
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | ?color? ?dog|cat? with ?orange|black? dots on the ?couch|floor? | Use pattern ?word1|word2|metaword? to randomize. Encapsulate groups with question marks. Meta-words are looked up in the dictionary. |
| dictionary_filename | STRING | prompt_dictionary.json | Dictionary filename (relative to this node pack). Will create a default if not found. |
| seed | INT | -1-1–18446744073709550000 | Set to -1 for random seed each run, or any positive number for reproducible results. |
| preserve_newlines | BOOLEAN | false | Keep newlines in output. When disabled, newlines are converted to commas. |
| clean_text | BOOLEAN | true | Apply text cleaning (remove extra spaces, fix punctuation, convert anime terms). |
| prompts_count | INT | 11–100 | Number of randomized prompts to generate. Useful for batch processing with samplers that support multiple prompts. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| modified_prompts | STRING | — |
| selections | STRING | — |
| used_seed | INT | — |