SEGS Assign (label)
Tag detections so FaceDetailer's [LAB] wildcard can prompt each one differently
- segs
- SEGS
If you've ever run FaceDetailer on an image with three faces in it and wished you could prompt each face differently - "elderly man" for one, "young woman" for another - this is the node that makes that possible. It assigns labels, one per detected element, sequentially through a SEGS collection, and those labels become substitutable tokens a Detailer's wildcard prompt can reference.
How the [LAB] wildcard connects to this
Impact Pack's wildcard system supports a [LAB] token in Detailer prompts specifically for this purpose - the pack substitutes whatever label was assigned to the SEGS element currently being processed. Without labels, every detected region in a batch gets the same prompt text. With labels assigned via this node, you can write one prompt template with [LAB] in it and have each detection pull in its own descriptive text as the Detailer works through the SEGS collection.
The inputs and output
segs(SEGS) - the collection to label.labels(multiline STRING) - the labels to assign, one to each element in order.
Output is a single SEGS - same detections, now carrying labels.
The part worth being careful about
"Sequentially" means labels get matched to SEGS elements by whatever order the collection is already in when it reaches this node - usually whatever order your detector produced them in, which isn't always predictable and isn't always left-to-right or top-to-bottom in an obvious way. If you're assigning "person A" to element 1 and "person B" to element 2 assuming a particular spatial order, verify it - a detector's internal ordering (often by confidence, sometimes by detection sequence) can put things in an order you didn't expect.
The README doesn't spell out what happens if your label count doesn't match your SEGS element count - that's a genuine gap in the pack's own documentation, not something this article is going to guess at. If you go this route, count both sides yourself, and check the actual assignment with SEGSPreview before running an expensive detail pass depending on it - cheaper to catch a mismatch there than after a full batch renders.
Installing it
No separate install - bundled with the pack. Via ComfyUI Manager: search ComfyUI Impact Pack, Install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack
cd ComfyUI-Impact-Pack
pip install -r requirements.txt
(portable: python_embeded\python.exe -m pip install -r requirements.txt), restart. No models needed for this node - it's metadata assignment, not detection or sampling.
Common issues
Labels landing on the wrong element is the main failure mode, and it's almost always an ordering assumption rather than a bug - verify with a preview rather than trusting spatial intuition about which detection is "first." Beyond that, this only matters if you're building a multi-subject prompt-per-region workflow; for a single-subject FaceDetailer pass, you'll never need this node at all.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| segs | SEGS | — | |
| labels | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SEGS | SEGS | — |