ComfyUI Node
Random Line From File (Wildcard)
Picks one random line from a text file using its own seed, independent of the KSampler's. Uses a private random.Random instance rather than reseeding Python's global random module, so it won't affect -- or be affected by -- any other node in the same ComfyUI process that also calls random.*. Blank lines and lines starting with '#' are skipped, so you can comment out entries in your wildcard file. The parsed line list is cached by the file's mtime, so large wildcard files aren't re-read from disk on every single execution.
Random Line From File (Wildcard)
- random_line
- seed_output
◄text_path—►
◄seed0►
◄prompt_mode▾►
◄prompt_fixed_seed0►
◄lora_trigger—►
◄prefix_text—►
CategoryMy_Custom_Nodes
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| text_path | STRING | — | |
| seed | INT | 00–18446744073709550000 | — |
| prompt_mode | COMBO | 3 options: Follow KSampler/Seed Field, Use Dedicated Prompt Seed, True Independent Random | |
| prompt_fixed_seed | INT | 00–18446744073709550000 | — |
| lora_trigger | STRING | — | |
| prefix_text | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| random_line | STRING | — |
| seed_output | INT | — |