Prompt Random Line π―
Pick a random lighting/style line from a pasted list, reproducibly
- chosen_line
- line_index
- total_lines
Want variety without a wildcard system? Prompt Random Line π― takes a multiline list you paste right into the node and picks one line, deterministically seeded. It's the inline, no-files-required companion to a wildcard loader: for a one-off set of lighting or style alternatives, you don't want to manage a separate .txt file in a wildcards folder - you want a list living in the node.
The default text is a lighting list (cinematic lighting / soft studio lighting / golden hour / neon backlight), which tells you exactly what it's for: sticking a random lighting choice into an otherwise fixed prompt, batch after batch.
How it works
It splits the text on newlines, ignores blank lines and any line starting with # (so you can keep comments and spacing in the list without them ever being selected), and picks one entry using seed. Same seed, same line, every time - which is the property that makes it usable: lock the seed and you can reproduce a batch; change it and you roll again.
Outputs are chosen_line (the picked text), line_index (which position it came from), and total_lines (how many were eligible). Those last two are surprisingly useful - total_lines tells you at a glance whether your list actually has the variety you think it does, and line_index lets you log which variant fired.
The inputs that matter
text and seed. That's the entire surface. Feed chosen_line into a prompt combiner or directly into your CLIP encoder. Drive seed from the same source as your sampler seed if you want the random line and the noise to stay in lockstep, or from an independent counter if you want them to vary independently.
The honest limitation: it's one line from one pasted list. For nested __wildcard__ resolution inside a larger prompt, the pack's Wildcard Loader is the right tool. This node is for the quick case - a handful of alternatives, zero file management.
Installing it
Part of the OmniNodes pack:
cd ComfyUI/custom_nodes/
git clone https://github.com/TensorVizion/OmniNodes
Restart ComfyUI (or search "OmniNodes" in ComfyUI Manager). No extra dependencies. Registers under TensorVizion/Prompt. If it doesn't appear after install, restart completely and check the terminal for [OmniNodes] β
Loaded lines.
It's a small node and it knows it - but for anyone doing variation batches, a seeded random choice in the middle of the graph is one of those tiny conveniences you stop noticing, until you try going back to hand-editing prompts between runs.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | cinematic lighting soft studio lighting golden hour neon backlight | β |
| seed | INT | 00β18446744073709550000 | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| chosen_line | STRING | β |
| line_index | INT | β |
| total_lines | INT | β |