260e86b52951ea41f3eb4ad982bd2f242dc25168
ComfyUI Dynamic Prompting Simplified
A minimal dynamic prompting + mirrored wildcards node for ComfyUI.
Features
{a|b|{c|d}}nested choice expansion (deterministic by seed).__name__loadswildcards/name.txt.__name-mir__strictly loadswildcards/name-mir.txt.- In negative phase, if
__name__is used andname-mir.txtexists, it auto-mirrors to all options except the chosen one. - Deterministic selection per seed.
Install
- Copy this folder to:
<ComfyUI>/custom_nodes/ComfyUI-DynPromptSimplified - (Optional) Put your wildcard files in
ComfyUI-DynPromptSimplified/wildcards/or setwildcard_dirto any folder. - Restart ComfyUI.
Node
DynPrompt Expand (mirrored wildcards)
- Inputs:
text,negative,seed,wildcard_dir,auto_neg_from_mir - Outputs: expanded
text, expandednegative
Wire the outputs into your usual CLIP Text Encode → KSampler chain.
Examples
Wildcards:
wildcards/hats.txt
{red hat|blue hat|green hat}
wildcards/hats-mir.txt
{red hat|blue hat|green hat}
Prompt:
a portrait wearing __hats-mir__, background {studio|outdoor|cyberpunk}
- Positive becomes a single chosen hat (by seed).
- Negative becomes the other hats, comma-separated.
Notes
- Missing wildcard files resolve to empty strings.
- Choice/wildcard expansion is capped to prevent runaway recursion.
- If
negativeis blank andauto_neg_from_miris ON, the node scans the positive for__tokens__and auto-builds a mirrored negative when possible.
License: GPLv3 (same as the original)
Languages
Python
100%