EmberFrame Wildcard Prompt Assembler
Every run gets a different line, in order
- prompt_out
- preview_text
- selected_values
- resolved_token_count
Random wildcards are easy to get - half the packs in Comfy do them. Sequence-controlled wildcards, where run 1 pulls line 1, run 2 pulls line 2, and you can reproduce any run exactly, are a different story. EmberFrame Wildcard Prompt Assembler is the engine room of the EmberFrame wildcard family, and it does deterministic variation properly: you feed it a prompt template with placeholders plus a config of rules, and it resolves every token to a concrete line based on a single run_counter.
It's the node the other three exist for. Rule Builder writes a rule, Config Combiner bundles several rules into one config, and the Assembler actually resolves them into a finished prompt you can hand to your text encoder.
How it works
Your prompt template looks like masterpiece, {character}, wearing {outfit}, {pose} (that's literally the default). Your wildcard_config is one rule per line in the five-field format:
token_name | wildcard_file | mode | start_line_number | repeat_each_line
For each rule, the assembler finds the file, loads the non-blank, non-# lines, and picks an index. The modes:
- fixed - always
start_line_number. - next - advances one line every
repeat_each_lineruns (sorepeat_each_line = 3spends three runs on each line). - previous - same but backwards.
- randomize - a deterministic random pick, seeded from the token, file, and run block. Same config and run counter, same line. No PRNG chaos between batches.
Each resolved line replaces its placeholder in the prompt; if a placeholder isn't in the template, the value gets appended comma-separated.
The inputs and outputs that matter
- prompt - your template with
{token}placeholders. - wildcard_config - the multi-line rule config (from Config Combiner, or typed by hand).
- run_counter - the single number that drives
next/previous/randomize. Wire it to a counter or the batch seed and every generation steps through your lists.
Outputs: prompt_out (feed it to your CLIP/text encode node), preview_text (a full trace - original prompt, each resolved line, final prompt), selected_values (per-token placeholder -> line N from file :: value), and resolved_token_count.
Installing it
Part of the EmberFrame Nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/emberframe/emberframe-nodes.git
Restart Comfy, or install "EmberFrame Nodes" via ComfyUI Manager. No dependencies, no models; it lives under EmberFrame/Prompt. If you were using the old standalone ComfyUI-WildcardPromptAssembler pack, this replaces it.
Common issues
- "Wildcard file not found" - the error message lists a dozen available files. It's almost always a renamed folder (the bundled files keep the
emberframe-nodes:prefix precisely so renames don't break the config) or a.txtsitting outside the scanned roots:custom_nodes/wildcards,ComfyUI/wildcards, or a sibling pack'swildcards/folder. - "Invalid wildcard_config line" - every non-blank, non-
#line must have exactly five pipe-separated fields. The error tells you the line number, and it's almost always a hand-typed config with a stray pipe or a missing mode. - Blank rule slots are fine; blank lines aren't - the Config Combiner drops empty rules before they reach here, so a combiner-fed config is clean. If you hand-type the config, blank lines are ignored but a line with a bare
|is not. randomizeisn't "random random" - it's seeded and reproducible. If you want true dice-roll variety per image, that's a different tool; this one guarantees you can replay any run.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | masterpiece, cinematic lighting, {character}, wearing {outfit}, {pose} | — |
| wildcard_config | STRING | — | |
| run_counter | INT | 00–18446744073709550000 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| prompt_out | STRING | — |
| preview_text | STRING | — |
| selected_values | STRING | — |
| resolved_token_count | INT | — |