API-Friendly Wildcard Processor (DaimalyadNodes)
The wildcard node that actually changes on every API call
- text
The name is doing a lot of work, and the "API-Friendly" part is the whole point. A plain wildcard node will happily swap {cat|dog} for a random pick on your first run, then quietly replay the same resolved prompt every time you re-queue - because ComfyUI caches node outputs between executions with identical inputs. DaimalyadWildcardProcessor exists to break that cache. Every run, no exceptions, you get a fresh pick. If you're driving ComfyUI through /prompt API calls, or a frontend that re-submits the same workflow JSON, that's exactly the behavior you want.
Mechanically it's almost boring, in a good way. The node implements IS_CHANGED by returning float("NaN") - ComfyUI treats NaN as "this node always changed," so the result is never cached. Then a resolver parses your text with a random.Random seeded from time.time_ns(), the nanosecond clock, which guarantees a different seed - and therefore a different pick - on every execution. Input is one multiline text field, output is one resolved string. That's the entire interface.
The syntax is old A1111-style wildcards, the same bracket trick the community has used for years: {option1|option2|option3} picks one, and nesting works ({red {car|bike}|blue}), so you can compose variety without any wildcard-file system. The escape sequences \{, \|, \} let you keep literal braces - important if your prompt embeds JSON or a brace you genuinely mean. An unmatched { is left as-is rather than erroring out.
Where people get burned - two ways:
- It's always-fresh, by design, and you can't turn it off. There's no seed input and no "resolve once" mode. If you're building an XYZ-style comparison grid and need the same resolved prompt across cells, this is the wrong node. The community has a whole history of fighting for the opposite behavior - pinning wildcard values so grids stay comparable. This node sits firmly on the "max variety" side of that trade.
- The escape game. A wildcard processor that doesn't honor escapes will mangle any text with structural braces. This one does honor them, but you have to remember to use them. If your prompt starts dropping options you didn't mean to randomize, look at your braces first.
Also note the source prints [WildcardProcessor] Input/Output/seed to the console on every execution. Harmless, mildly chatty - but on a long batch you'll see one line per run.
Where it fits. Wire it between a text source and your CLIP text encoder, then batch. The KB's prompt-engineering essay calls this the bracket trick: take a base prompt, wrap a few slots in {this|that}, queue 32, and get a spread of genuinely different images with zero prompt-writing effort. Great for character libraries, mood boards, or just escaping the "same five prompts" rut. And because the node always re-executes, one API workflow JSON resubmitted a hundred times produces a hundred different prompts - that's the "API integration" promise made real.
Install. Same pack as the Model Downloader, so if you have one you have the other. ComfyUI Manager → Install Custom Nodes → search daimalyadnodes → Install, then restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/apeirography/DaimalyadNodes.git
No pip dependencies (standard library only), no models to download, Python 3.8+. The README's clone URL still says daimalyad/DaimalyadNodes while the pack tracks apeirography/DaimalyadNodes - renamed org, same code. It's a small pack with zero search impressions and no real community footprint, so treat it as new-and-unproven: it works as described, and the whole node is short enough to read in one sitting, which you should.
Troubleshooting, grounded in what the code actually does:
- "The image didn't change." If the wildcard is clearly re-running (watch the console prints) but your image looks identical, check the sampler seed - that's the usual culprit, not this node. But if you were expecting reproducible outputs and got variety instead, see gotcha #1: that's the feature, not a bug.
- Literal braces becoming options. Escape them. That's the fix.
- Nothing else breaks. No seed node to wire, no cache config, no API keys. It either resolves or it doesn't.
Honest verdict: if you only generate interactively in the UI, plenty of wildcard nodes do the same job with more controls. If you're automating - batch jobs, API clients, a queue system - the always-fresh re-execution is a genuinely useful quirk most competitors don't have. Just don't expect it to pin anything down.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |