SEGS Filter (label)
Keep only the faces, only the hands, only the eyes
- segs
- filtered_SEGS
- remained_SEGS
When a detector runs, it doesn't always hand you one clean thing. Run a face-and-hand detector over a full-body shot and your SEGS comes back with faces and hands mixed together. Run MediaPipe FaceMesh and you get a whole zoo of labeled parts - eyes, eyebrows, mouth, pupils. SEGS Filter (label) splits that pile by label so each region type can go down its own path. Faces get a face-tuned detail pass, hands get a hand-tuned one, and the two don't step on each other.
This is a routing node, and it's the clean way to run different denoise or different prompts per body part instead of blasting everything with one setting.
How it works
Every SEG carries a label the detector assigned it ("face", "hand", and so on). This node reads those labels and sorts the SEGS into two buckets: the ones that match your filter, and the ones that don't. The README's summary is exactly right - it "filters SEGS based on the label of the detected areas." Nothing is generated or destroyed; the input SEGS just gets partitioned by name.
The inputs and outputs
segs- the detections to sort. Required.preset- a dropdown of known labels to match. It's a big list (over a hundred entries, coveringall,hand,face,mouth,eyes,eyebrows,pupils, the left/right split of each, and plenty more), because it's built to handle the fine-grained landmarks that MediaPipe FaceMesh produces, not just coarse face/hand detection.labels- a free-text box for custom or multiple labels when the preset dropdown doesn't cover what you want. Useful with detectors that emit their own class names.
Two outputs, and this is the part people miss: filtered_SEGS is what matched your filter, and remained_SEGS is everything else. Both are live - you can send filtered_SEGS (say, the faces) to one detailer and remained_SEGS (the hands) to another, and nothing gets dropped on the floor.
How to install it
Through ComfyUI Manager: search ComfyUI Impact Pack, install, restart. Or manually: cd ComfyUI/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack, then install the requirements into ComfyUI's own Python (pip install -r requirements.txt; on Windows portable use ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt), and restart. Auto-install went away in v7.6. A small SAM model downloads into ComfyUI/models/sams on first launch.
Common issues
filtered_SEGS comes out empty. The label you're filtering on doesn't match what the detector actually assigned. A plain BBOX face detector tends to label everything face (or the model's class name), so filtering for eyes gets you nothing - you only get eye/mouth/eyebrow labels from something like MediaPipe FaceMesh that emits per-landmark labels. Check what your detector actually labels before assuming the filter is broken.
You expected the leftovers to disappear. They don't - that's the design. Anything not matched flows out remained_SEGS. If you genuinely only want the matches, just leave remained_SEGS unconnected. And if you need size or position filtering rather than label filtering, that's a different node in the pack (SEGS Filter (ordered) / (range)); this one only knows about names.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| segs | SEGS | — | |
| preset | COMBO | 106 options: all, hand, face, mouth, eyes, eyebrows, +100 | |
| labels | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| filtered_SEGS | SEGS | — |
| remained_SEGS | SEGS | — |