Wildcard Encode (Inspire)
Dynamic prompts, inline LoRAs, and A1111-style weighting in one node
- model
- clip
- model
- clip
- conditioning
- populated_text
This node does three jobs at once: it expands wildcards and dynamic prompts, it loads any LoRAs you name inline in the text, and it encodes the whole thing into conditioning - using BlenderNeko's advanced CLIP encoder rather than ComfyUI's default. It's the Impact Pack's ImpactWildcardEncode, rebuilt to encode with CLIP Text Encode (Advanced) so you get A1111-style prompt weighting on top of the wildcard machinery.
If you've come from A1111 and miss typing __hairstyles__ to roll a random option, or <lora:detail:0.6> right in the prompt, this is the node that brings both to ComfyUI in one place. It's especially handy because it hands back a patched model and clip and the encoded conditioning, so a single node covers "roll the prompt, apply the LoRAs, encode it" instead of a chain of three.
How it works
You write your prompt in wildcard_text using the Impact/dynamic-prompt syntax: __name__ pulls a random line from a wildcard file, {a|b|c} picks one of the options, and <lora:name:weight> loads a LoRA inline. On run, it populates the random choices into populated_text, loads the referenced LoRAs onto the model/clip, and encodes the result. The mode controls the randomness: populate re-rolls every run, fixed keeps what's there, and reproduce restores a specific past populated_text so you can recreate an earlier result.
The inputs and outputs that matter
- wildcard_text - your prompt with wildcards,
{a|b|c}choices, and inline<lora:…>tags. - mode -
populate(reroll),fixed(keep), orreproduce(restore an exact past populate). - weight_interpretation - how prompt weights are read:
comfy,A1111,compel,comfy++(the default), ordown_weight. PickA1111if you're matching weights from an A1111 prompt.
Outputs: model and clip (patched with the inline LoRAs), conditioning (the encoded prompt, straight into a KSampler), and populated_text (what the wildcards actually rolled).
Installing it
ComfyUI Manager: search "Inspire Pack", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack
Then restart. This node has two hard dependencies the README spells out: the Impact Pack (for the wildcard processing) and BlenderNeko's Advanced CLIP Text Encode (ComfyUI_ADV_CLIP_emb, for the encoding). Install both.
Where people get tripped up
Miss either dependency and the node either won't load or won't encode the way you expect - the Impact Pack supplies the wildcard engine, the Advanced CLIP encoder supplies the weighting, and Wildcard Encode is just the seam between them. Second thing: wildcards only work if you actually have wildcard files. The __name__ syntax reads from text files in the wildcards folder, so an empty setup means __hairstyles__ just sits in the prompt as literal text. And if you're chasing reproducibility, remember populate re-rolls on every run - switch to fixed or reproduce once you've got output you like, or your "final" render won't match the one you were happy with.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| token_normalization | COMBO | 4 options: none, mean, length, length+mean | |
| weight_interpretation | COMBO | comfy++ | 5 options: comfy, A1111, compel, comfy++, down_weight |
| wildcard_text | STRING | — | |
| populated_text | STRING | — | |
| mode | COMBO | populate | populate: Before running the workflow, it overwrites the existing value of 'populated_text' with the prompt processed from 'wildcard_text'. In this mode, 'populated_text' cannot be edited. fixed: Ignores wildcard_text and keeps 'populated_text' as is. You can edit 'populated_text' in this mode. reproduce: This mode operates as 'fixed' mode only once for reproduction, and then it switches to 'populate' mode. |
| Select to add LoRA | COMBO | 1 options: Select the LoRA to add to the text | |
| Select to add Wildcard | COMBO | 1 options: Select the Wildcard to add to the text | |
| seed | INT | 00–18446744073709550000 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| conditioning | CONDITIONING | — |
| populated_text | STRING | — |