Nodes/ComfyUI-LukutarNodes/Annotations to Wildcard (LAB)
ComfyUI Node

Annotations to Wildcard (LAB)

Annotations to Wildcard (LAB)

By Mistress-Lukutar·Created 7 days ago·Updated 2 days ago· 1
Annotations to Wildcard (LAB)
  • annotations
  • wildcard

If you've built a ComfyUI regional detailing workflow, you've met the Impact Pack's wildcard input on Detailer (SEGS) - the text that lets you give each detected region its own prompt. It takes a label-mode format that looks like this:

[LAB]
[ALL] masterpiece,
[body] 1girl, thin, red hair, stands
[face] blue eyes, smirk
[hair] red hair
[background] outdoors, park

Annotations to Wildcard (LAB) is the bridge that produces exactly that from your Prompt Annotate output. One annotated prompt in, Impact Pack's own [LAB] format out - no hand-transcribing your regional prompts into the wildcard syntax, which is fiddly enough to get wrong that this node earns its keep.

How it maps

The conversion is mechanical and worth understanding once so nothing surprises you:

  • The unmarked common part of your prompt becomes the [ALL] line. In the example, masterpiece is the common part.
  • Each labelled span becomes a [label] text line.
  • A span with several labels (|body,hair: red hair|) is duplicated into each of its label lines - that's why red hair appears under both body and hair above.
  • Impact Pack concatenates [ALL] and the matching label value with no separator, which is why the [ALL] line ends with a comma whenever label lines follow - the node knows this and preserves the comma so the joined text reads correctly.

The output is a single wildcard (STRING) string. Wire it into the wildcard input of Detailer (SEGS) or any Impact Pack node that consumes label-mode wildcards.

The one input

annotations - the ANNOTATIONS output from Prompt Annotate (Lukutar). That's the whole input list. Strictly typed like the rest of the family: it has to be an actual ANNOTATIONS value, and the error message tells you if it isn't.

Installation

Part of ComfyUI-LukutarNodes (MIT). ComfyUI Manager: Custom Nodes Manager → Install via git URLhttps://github.com/Mistress-Lukutar/ComfyUI-LukutarNodes, or:

cd <ComfyUI>/custom_nodes
git clone https://github.com/Mistress-Lukutar/ComfyUI-LukutarNodes

Restart ComfyUI. Only extra runtime dependency is opencv-python (>= 4.8); Manager installs requirements.txt, manual installs may need pip install opencv-python. No models, no keys. Category Lukutar/Prompt.

What it needs from you

Two things, both worth planning for:

  1. Impact Pack must be installed to consume the output. This node only generates the wildcard text; it doesn't ship a Detailer. If you're using Annotations to Wildcard, you're building on the Impact Pack ecosystem and need ComfyUI-Impact-Pack (and its detectors) installed anyway.
  2. Your labels must match your downstream classifier vocabulary. The wildcard only works as well as the annotation's labels, and nothing in this pipeline validates them - a [face] line for a detector whose class is person silently does nothing. Use Annotation Labels alongside it to see the region set at a glance before you queue.

One honest note on scope: this converts annotations to the label-mode wildcard ([LAB]). If you don't want label-mode, this isn't your node - but for the regional-prompt workflow it's the natural endpoint of the annotation chain, and it's refreshingly simple to reason about.

CategoryLukutar/Prompt

Inputs (1)

NameTypeDefaultDescription
annotationsANNOTATIONSAnnotations from Prompt Annotate (Lukutar)

Outputs (1)

NameTypeDescription
wildcardSTRING