ComfyUI supports {option|option} wildcard syntax in text prompts for random variation
In the CLIPTextEncode node’s text field, curly-brace syntax {option1|option2|option3} randomly selects one option each time a prompt is queued. The frontend replaces the token before sending to the backend, so each queue submission may produce a different variant. This enables batch generation with diverse prompts from a single workflow. The syntax also supports C-style comments (// and /* */). Use {|} to escape literal curly braces. This is a frontend feature, not a sampler feature — the backend always receives a fully resolved string.
Examples
“{a cat|a dog|a bird} sitting on {a log|a rock}” → randomly generates one of six combinations each queue.
Assessment
A user wants to generate 10 images with random subject variations. What prompt syntax achieves this, and what node setting controls how many images are generated per queue?