SimpleWildcards
__pick__ a random line from a text file, that's it
- prompt
The minimal wildcard node: type a prompt with __something__ tokens in it, and each run swaps those tokens for a random line from a text file. That's the entire job, and it's exactly what a lot of people actually want - prompt variety without pulling in a heavyweight dynamic-prompts system. The A1111 wildcard trick has been around since the SD1.5 days, and this is that same trick with the plumbing reduced to one node.
How it works
Give it a wildcard_text prompt containing __name__ tokens. It looks for wildcards/name.txt in the pack's own folder, reads the file, picks a random non-empty line, and replaces the token with it. Multiple tokens are handled in one pass. There's no recursive nesting, no dynamic-prompt engine, no {a|b|c} syntax - just "replace each __name__ with a random line from the matching file." Whatever you write gets returned as the prompt string, ready for a CLIP text encoder.
Inputs and outputs
One input: wildcard_text (multiline STRING). One output: prompt (STRING). The input is marked dynamicPrompts on the backend, so in ComfyUI's UI you may also see dynamic-prompt processing depending on the frontend - but the node's own behavior is the simple file-based replacement described above.
How to make it useful
Create a wildcards/ folder inside the pack directory and drop in text files named after your tokens:
wildcards/outfit.txt
wildcards/pose.txt
each with one option per line, then prompt like:
1girl, __outfit__, __pose__, masterpiece
Each queue run draws a fresh combination. That's the whole workflow - you get controlled randomization over a fixed vocabulary, which is the standard recipe for batching character-reference or style variations (the old {this|that} bracket trick does the same job inline; wildcards scale better when the option lists are long).
The caveat that applies to everything in this pack
The current repo was rewritten in April 2025 and ships only the GPT4V captioner - this node and the wildcards/ folder were deleted. Install today and you won't find SimpleWildcards in the node list; the code lives in the old Load_Image_Batch.py in the repo's git history. If wildcards are your goal, plenty of maintained packs (WAS Node Suite, and others) do this with more features - use those unless you specifically want this pack's minimal version.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/438443467/ComfyUI-GPT4V-Image-Captioner
Restart ComfyUI. No models, no heavy dependencies - the wildcard text files are the only "content" it needs.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| wildcard_text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |