MaskListSelect(FaceParsing)
The same index-pick trick, for masks
- mask
- MASK
Exactly what it sounds like, and exactly the mask-flavored version of ImageListSelect: given a batch or list of masks, pull the one at a given index. It shows up whenever you're working with per-face masks in bulk and need to isolate one - say, you built masks for several detected faces and want to process (or preview, or composite) just one of them at a time.
The inputs that matter
- mask (MASK) - required, the batch or list of masks you're selecting from.
- index (INT, default 0, min 0) - which mask to pull, zero-indexed.
The output is a single MASK - the one at the requested index.
Where it fits
Pairs naturally with a multi-face workflow where FaceParsingResultsParser or MaskToBBoxList produced masks for several faces at once, and you now need to route face N's mask specifically into a compositing or smoothing step (like GuidedFilter) that expects one mask at a time rather than a batch. It's the mask-side sibling of ImageListSelect and BBoxListItemSelect - this pack has one of these per data type (image, mask, bbox), and they all work the same way.
Installing it
Bundled with the whole pack:
- ComfyUI Manager - search "comfyui_face_parsing", install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/Ryuukeisyou/comfyui_face_parsing.git, restart ComfyUI.
No dependencies beyond the pack itself.
Common issues
Same as its siblings: asking for an index beyond the list's actual length is the one real way this breaks, and there's no built-in guard against it. If the number of masks in your list varies per input (a different number of faces detected each run), verify the count before picking a fixed index - don't assume every image in a batch job has the same number of faces as the one you tested with.
Worth also double-checking that the mask you're indexing into is actually a list of separate per-face masks and not one combined mask covering every detected face at once - FaceParsingResultsParser, for instance, gives you one mask per call rather than a batch, so you'd need to call it once per face (after splitting with BBoxListItemSelect/ImageListSelect) if you want a genuine per-face mask list to index here. Indexing into something that's really a single mask just returns the same mask regardless of index, which reads as this node being broken when the actual issue is upstream.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — | |
| index | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |