π‘ Prompt Generator π‘ (Advanced)
The tunable engine behind Adaptive Prompts
- context
- prompt
- context
If you've used {red|green|blue} brackets or __wildcard__ files in Automatic1111 or the old adieyal Dynamic Prompts node, this is that same idea rebuilt from scratch for ComfyUI, with the config knobs exposed instead of hidden behind a settings menu. Prompt Generator (Advanced) is the flagship node of Alectriciti's Adaptive Prompts pack, which bills itself openly as a reimagining of Dynamic Prompts - a tool a lot of people still depend on but that's gone quiet on updates. Adaptive Prompts launched in late 2025 to a genuinely warm reception on r/comfyui and has kept shipping since (v0.2.0 landed a new LoRA-aware node in July 2026), so this isn't an abandoned side project - it's actively maintained.
The plain Prompt Generator node does the same core job with sane defaults; this Advanced version exists for when you need to override those defaults explicitly, mid-graph, without touching the global settings.
How it works
Two syntaxes drive everything: {option_a|option_b} picks one option at random, and __filename__ pulls a random line out of comfyui-adaptiveprompts/wildcards/filename.txt. Both nest - a wildcard file can contain more brackets or more wildcard calls, and folder globbing (__colors/*__, __lighting_*__) lets you randomize which file gets used, not just which line.
The knob that matters most here is rng_mode. Adaptive (the new default) generates each wildcard's result off an isolated signature, so you can rearrange __color__ __fruit__ in your prompt text and get a stable result - reordering doesn't cascade into a different roll. Legacy is the old-school behavior: sequential RNG where moving one wildcard earlier or later in the string changes everything downstream of it, exactly like classic Dynamic Prompts. If you're porting an old workflow and the output looks nothing like what you remember, this is almost always why - flip to Legacy.
The inputs and outputs that matter
prompt- your multiline text with brackets and wildcards in it. This is the only thing you have to write yourself.seed- standard reproducibility control.category- which wildcards subfolder to draw from. Defaults to the pack's ownwildcards/folder; create awildcards_fresh-style alternate folder (must start withwildcards_) and select it here to swap entire wildcard sets without editing your prompt text. If a file's missing from the alternate folder, it falls back to the global one.hide_comments- strips## comment ##blocks out of the final resolved text. Leave this on unless you're debugging variable assignments and want to see what's happening inline.rng_mode- Adaptive or Legacy, covered above.context(optional input,DICToutput) - this is how variables assigned with__thing^varname__syntax survive into a later generator node. Wire thecontextoutput of one Prompt Generator into thecontextinput of the next to chain them, or run several in parallel and combine their contexts withPromptContextMerge.
How to install it
Search comfyui-adaptiveprompts in ComfyUI Manager and install, or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Alectriciti/comfyui-adaptiveprompts
Restart ComfyUI. There's nothing to download - it's pure Python string processing, no models, no heavy dependencies. Wildcard files you add or edit refresh live; you generally don't need to restart again after your first install just to pick up new .txt files (a couple of the pack's other nodes cache more aggressively - see their own pages).
Common issues & troubleshooting
Wildcards go in the pack's own folder, not a shared one. The README is explicit: __wildcard__ files must live at comfyui-adaptiveprompts/wildcards/, which is a different location than wildcard folders used by other packs like Impact Pack. Copying a .txt file into the wrong custom-node directory is the most common reason a wildcard silently resolves to nothing.
A missing wildcard used to throw an error; now it doesn't. Recent versions handle unresolved __wildcard__ calls gracefully instead of failing the whole generation - if you're not seeing an error you expect, that's by design, not a bug you introduced.
Results changed after an update, with no config changes on your end. Adaptive became the default RNG mode partway through the pack's life. If a saved workflow suddenly reorders differently than it used to, set rng_mode to Legacy explicitly rather than relying on the implicit default.
LoRA filenames with double underscores used to break the parser. That's fixed - <lora:coolest__lora__ever__:1.0> no longer derails wildcard resolution, so don't rename your LoRAs to work around it if you hit older advice suggesting that.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | β | |
| seed | INT | 00β18446744073709550000 | β |
| hide_comments | BOOLEAN | true | β |
| category | COMBO | wildcards | Select which wildcards folder to use. Create alternate folders named 'wildcards_*' (eg. 'wildcards_fresh') inside the package root. defaults to the global '/wildcards/ if a file is missing' |
| rng_mode | COMBO | Adaptive | Adaptive: Isolated RNG for strict prompt stability, allows re-arrangement.\Legacy: Sequential RNG which cascades changes (classic Dynamic Prompts) |
| contextopt | DICT | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | β |
| context | DICT | β |