π Wildcard File Loader
Random prompts from .txt files, in the standard wildcards folder
- selected_text
"π Wildcard File Loader" is the file-backed randomizer of this pack. Where the other randomizers take their candidates from a text box, this one reads them from a plain .txt file sitting in ComfyUI's standard wildcards/ folder, then picks a random line with the same weighted engine as the rest of the pack. It's how you keep a library of prompt options that outlives any single workflow - edit the file, and every workflow that loads it picks up your changes.
How it works
On startup the node scans ComfyUI/wildcards/ recursively for .txt files and offers them in a dropdown. You pick one, give it a seed, and it reads the file line by line, drops blank lines and anything starting with # (your comment syntax), and runs the pack's weighted random pick: plain lines are equal options, option :: 2 lines are weighted. The chosen line's {a|b} brackets get expanded too, since the loader reuses the MultilineRandomChanceNode engine end to end. Subfolders are preserved in the dropdown, so you can organize as subjects/, lighting/, cameras/ and read a full path back.
One convention difference worth naming: this is line-as-option, not the __underscore__ dynamic-wildcard syntax some other wildcard tools use. This node does not recurse into other wildcard files or inline references - it picks one line from one file and returns it. If you were expecting __characters__ syntax to work, that's a different ecosystem.
The inputs that matter
- wildcard_file - the dropdown of
.txtfiles found inComfyUI/wildcards/(recursively). If the folder is empty, the dropdown shows "No .txt files found in ComfyUI/wildcards/". - seed - pins the pick; same seed plus same file equals the same line.
Output: selected_text (STRING) β CLIP Text Encode or a concatenator.
Installing it
Same as the whole pack - no requirements.txt, no models, pure Python. The README is a "TODO." stub; the folder is the install.
ComfyUI Manager β Custom Nodes Manager β search "TextRandomizer" β Install β Restart
or cd ComfyUI/custom_nodes && git clone https://github.com/fls-eugene/ComfyUI_TextRandomizer, then restart. Drop your .txt files into ComfyUI/wildcards/ and they appear in the dropdown.
Where people get burned
The dropdown is built when the node loads, so if you add a new .txt while ComfyUI is running, it won't show up until you reload the workflow or restart - don't hunt for a refresh button. Second, "wildcards" here points at the shared ComfyUI/wildcards/ folder, not one inside this pack, so a file placed by any other wildcard-oriented tool is fair game. And the seed trap applies: a fixed seed produces the same line forever, which is perfect for debugging and pointless if you wanted variety. Wire the seed to a randomizer before you start a batch.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| wildcard_file | COMBO | 1 options: No .txt files found in ComfyUI/wildcards/ | |
| seed | INT | 00β18446744073709550000 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| selected_text | STRING | β |