Multi-Wildcard Loader
Five wildcard files, combined two different ways
- combined_text
- preview_text
If Wildcards Text File Loader is one list, one pick, this is five lists at once - expressions, poses, clothing, scenarios, whatever you split your prompt building blocks into - combined into a single string two different ways depending on how much control you want over the sentence structure.
Why you'd reach for it
Once you've outgrown a single wildcard file - you're building prompts out of separate parts like "expression + pose + clothing + scene" rather than one flat list - stitching five Wildcards Text File Loader nodes together by hand gets tedious fast. This node folds that into one place: five independent wildcard slots, each individually toggled and seeded, plus a way to control exactly how they get glued together into a sentence instead of just concatenated in order.
How it works
Pick a mode: slots (the default) or template.
Slots mode uses the five wildcard_1 through wildcard_5 groups: each has its own _path (the .txt file), _enabled (on by default - flip it off to leave that slot out of the result entirely), and _line_index (-1 for random, or a fixed index if you want that one slot locked while the others vary). Whatever's enabled gets joined together with separator (default ", ").
Template mode hands you the wiring instead: template_text is a string with {filename.txt}-style placeholders that get replaced by a picked line from the matching file. The default example shows the idea - {expressions.txt} {poses.txt} wearing {clothing.txt} in a {scenarios.txt} - which is the thing slots mode can't do on its own: control the connective words ("wearing", "in a") around each wildcard pick instead of just separator-joining them in sequence.
seed governs the random resolution across whichever slots or placeholders are in play, same -1-for-random convention as the pack's other nodes.
Inputs and outputs
What you'll actually touch: mode, then either the five wildcard_N_path fields (slots mode) or template_text (template mode), and seed. separator is worth knowing about but rarely needs changing from its default.
Two outputs: combined_text, the assembled result you wire downstream into a CLIPTextEncode or into Animagine Prompt's prompt fields, and preview_text - a second copy of the same text meant for hooking to a text-display node. That second output earns its keep the moment you're randomizing five files at once and have no other way to see what a given batch actually rolled without digging through the generated image's embedded prompt.
Installing it
Bundled with the pack, no separate install. ComfyUI Manager: search ComfyUI-Animagine-Prompt. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/gmorks/ComfyUI-Animagine-Prompt
then restart. Same as the pack's other text nodes: no model downloads, nothing heavy.
Where people get burned
The seed/caching trap that applies to every random-pick node in this pack matters more here, because five files' worth of picks are riding on it: if outputs feel stuck between runs, right-click seed and set "control after generate" to randomize. In slots mode, remember that only enabled slots feed the output - toggling wildcard_N_enabled off is how you drop a slot, rather than clearing its path. And a practical note: this is the newest, least-battle-tested node in the pack - it currently gets essentially no search traffic, which tracks with it being a recent addition rather than something with years of bug reports behind it. If template mode does something unexpected with a filename placeholder, check the pack's GitHub issues before assuming you did something wrong; there just isn't much of a public track record on this one yet.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | slots | Slots: Use individual wildcard slots. Template: Use template with {filename.txt} placeholders |
| template_text | STRING | {expressions.txt} {poses.txt} wearing {clothing.txt} in a {scenarios.txt} | — |
| separator | STRING | , | — |
| seed | INT | -1-1–4294967295 | Seed for random selection (-1 for time-based seed) |
| wildcard_1_pathopt | STRING | — | |
| wildcard_1_enabledopt | BOOLEAN | true | — |
| wildcard_1_line_indexopt | INT | -1 | Line index for wildcard 1 (-1 for random) |
| wildcard_2_pathopt | STRING | — | |
| wildcard_2_enabledopt | BOOLEAN | true | — |
| wildcard_2_line_indexopt | INT | -1 | Line index for wildcard 2 (-1 for random) |
| wildcard_3_pathopt | STRING | — | |
| wildcard_3_enabledopt | BOOLEAN | true | — |
| wildcard_3_line_indexopt | INT | -1 | Line index for wildcard 3 (-1 for random) |
| wildcard_4_pathopt | STRING | — | |
| wildcard_4_enabledopt | BOOLEAN | true | — |
| wildcard_4_line_indexopt | INT | -1 | Line index for wildcard 4 (-1 for random) |
| wildcard_5_pathopt | STRING | — | |
| wildcard_5_enabledopt | BOOLEAN | true | — |
| wildcard_5_line_indexopt | INT | -1 | Line index for wildcard 5 (-1 for random) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| combined_text | STRING | — |
| preview_text | STRING | — |