Wildcard Prompt from String
Turn a plain string into per-region labeled prompts for tiled detailing
- wildcard
- segs_labels
This is a niche one, and it earns its place in a specific corner of Impact Pack: driving different prompts into different tiles when you're doing a tiled detail pass. Wildcard Prompt from String takes an ordinary string and reshapes it into a labeled wildcard - the format Impact Pack's detailers use to apply a different prompt to each detected region or tile. Its designed pairing is Make Tile SEGS: you're detailing a big image tile by tile, and you want, say, the sky tiles prompted differently from the ground tiles. This node builds the wildcard that makes that mapping possible from a string you already have.
If you're not doing per-region prompting across tiles or SEGS, you almost certainly don't need this node. When you are, it's the piece that saves you from hand-writing the labeled wildcard syntax.
How it works
You feed it a string plus a delimiter, and it breaks the string into entries and packages them as a labeled wildcard, optionally topping and tailing each entry with fixed text. It also emits the list of labels separately, so you can wire those into whatever consumes the region labels. The restrict_to_tags and exclude_tags inputs let you filter which entries make it into the wildcard, so you can pull a subset out of a larger string without editing the source.
The inputs and outputs that matter
string(STRING) - the source text to convert.delimiter(default\n) - how the string is split into individual entries. Newline by default, so one entry per line.prefix_all/postfix_all- text prepended/appended to every entry. Good for a shared quality tag ("masterpiece, ") without repeating it in each line.restrict_to_tags/exclude_tags- include-only and exclude filters, so you can narrow which entries end up in the wildcard.
Two outputs: wildcard (the assembled labeled wildcard string, which goes into a detailer's wildcard input) and segs_labels (the list of labels, for wiring into label-aware nodes).
How to install it
ComfyUI Manager: search ComfyUI Impact Pack, Install, restart.
Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack
cd ComfyUI-Impact-Pack
pip install -r requirements.txt
Run the pip in ComfyUI's Python environment and restart. No models needed. Wildcard files aren't required for this node - it builds the wildcard from your string directly - though the pack's broader wildcard system reads .txt/.yaml files from its wildcards folder if you use those elsewhere.
Common issues & troubleshooting
Is this the node you want at all? If you just want a single prompt, or dynamic {a|b|c} prompt syntax, this isn't it - look at ImpactWildcardProcessor for general wildcards. This node's specific purpose is producing labeled wildcards for the detailer to map onto separate regions, which is a fairly advanced tiled-detailing use.
The delimiter default is \n. Your entries split on newlines unless you change it. If you pasted a comma-separated string, set the delimiter to a comma or it'll treat the whole thing as one entry.
Labels don't line up with tiles. The wildcard maps entries to regions in order, so the order of your entries has to match the order the SEGS/tiles come in. If the mapping looks scrambled, that's an ordering problem between this node's entries and the tile SEGS, not a bug.
Empty output. Over-aggressive restrict_to_tags or exclude_tags can filter everything away. Clear those filters and confirm the raw string produces entries before narrowing.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — | |
| delimiter | STRING | \n | — |
| prefix_all | STRING | — | |
| postfix_all | STRING | — | |
| restrict_to_tags | STRING | — | |
| exclude_tags | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| wildcard | STRING | — |
| segs_labels | STRING | — |