Nodes/image_control/abyz22_ImpactWildcardEncode
ComfyUI Node

abyz22_ImpactWildcardEncode

Wildcards, LoRA tags, and a batch of prompts in one node

By abyz22·Created 3 years ago·Updated 2 years ago· 17
abyz22_ImpactWildcardEncode
  • model
  • clip
  • model
  • clip
  • conditionings
  • populated_text
batch_size1
wildcard_text
modetrue
Select to add LoRA
Select to add Wildcard
seed0

If you've seen workflows that generate the "same" character across a grid of poses and lighting, the trick is usually wildcard prompts - a prompt template that draws random phrases from text files on every run. abyz22_ImpactWildcardEncode is that mechanic bundled into one node: it populates __wildcard__ references, applies <lora:name:weight> tags by actually loading the LoRA, encodes the result, and hands you a batch of conditionings so one queue gives you N varied generations.

It's the flagship utility of abyz22/image_control, a fork of ltdrdata's Impact Pack. The node is a reimplementation of Impact's own ImpactWildcardEncode, and it calls straight into Impact's ImpactWildcardProcessor under the hood - so Impact Pack must be installed or this errors out at execution.

What it does

  • wildcard_text - your template, e.g. 1girl, __pose__, __lighting__, <lora:my_lora:0.7>. Wildcards resolve from the .txt/.yaml files in the pack's custom_wildcards folder; <lora:...> tags load real LoRAs from your models/loras directory and swap the tag out of the text.
  • batch_size - how many distinct populated prompts to generate. Each gets its own seed, and you get a CONDITIONINGS list out - wire it to a node that accepts a conditioning list, or use the single-conditioning sibling abyz22_ImpactWildcardEncode_GetPrompt for a one-shot.
  • mode - Populate (default) actually rolls the wildcards; Fixed passes the text through untouched, which is handy for A/B comparing.
  • Select to add LoRA / Select to add Wildcard - convenience dropdowns that list your installed LoRAs and known wildcards so you can click to insert instead of typing tags.
  • seed - the base seed; each batch item uses seed + i.

Outputs: the (possibly LoRA-modified) model and clip, the conditionings list, and populated_text - the actual rolled prompt as a STRING, so you can save or display what each image was generated from.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/abyz22/image_control

or ComfyUI Manager → "image_control", restart. Install Impact Pack separately - this node's processor lookup depends on it. Pack requirements add openpyxl, pytorch-lightning, kornia.

Where people get burned

Wildcards only resolve if the files exist in the configured wildcards folder (the pack's custom_wildcards next to ComfyUI/custom_nodes). A __typo__ that matches no file gets passed through literally, so "my batch is full of pose text" means a folder or filename mismatch, not a broken node. Also, wildcard resolution is seeded per item, so the same seed reproduces the same rolls - set seed and you can chase down a specific generation. And mind the impact-pack.ini wrinkle: this pack and real Impact Pack both write that config file, so keep them from fighting over wildcard paths by pointing custom_wildcards at one shared folder.

Categoryabyz22

Inputs (8)

NameTypeDefaultDescription
modelMODEL
clipCLIP
batch_sizeINT11–18446744073709550000
wildcard_textSTRING
modeBOOLEANtrue
Select to add LoRACOMBO1 options: Select the LoRA to add to the text
Select to add WildcardCOMBO1 options: Select the Wildcard to add to the text
seedINT00–18446744073709550000

Outputs (4)

NameTypeDescription
modelMODEL
clipCLIP
conditioningsCONDITIONINGS
populated_textSTRING