Nodes/comfyui_face_parsing/BBoxListItemSelect(FaceParsing)
ComfyUI Node

BBoxListItemSelect(FaceParsing)

Pull one face's box out of a multi-face detection

By Ryuukeisyou·Created 3 years ago·Updated about a year ago· 193
BBoxListItemSelect(FaceParsing)
  • bbox_list
  • BBOX
index0

FaceBBoxDetect and BBoxDetect hand you back a BBOX_LIST - one box per face they found. Most of the time you don't want to process every face identically as a batch; you want to grab one specific face, do something to it, then move to the next. This node is the plain index-based picker that makes that possible: give it a list and an index, get back the one box at that position.

The inputs that matter

  • bbox_list (BBOX_LIST) - required, from FaceBBoxDetect, BBoxDetect, or MaskToBBoxList.
  • index (INT, default 0, min 0) - which box to pull, zero-indexed. 0 is the first detected face.

The output is a single BBOX - ready to feed into ImageCropWithBBox, or anywhere else in the pack that expects one box rather than a list.

Where it fits

The typical use is a manual per-face loop when you know how many faces are in an image (or want to hardcode a specific one): detect with FaceBBoxDetect, pull face 0 with this node, crop and parse it, then bump the index to 1 for the next face. It's the more hands-on counterpart to running ImageCropWithBBoxList across the whole list at once - reach for this when faces need individually different handling rather than a uniform batch pass.

Installing it

Comes 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 - this is a plain list index.

Common issues

The obvious failure: asking for an index beyond the number of faces actually detected - index 2 on an image where only one face was found. There's no bounds-checking magic here; if you're building a workflow meant to handle a variable number of faces per image, pair this with the count output from BBoxDetect (or just check the list length) before assuming a given index exists, rather than hardcoding an index and hoping every input image has that many faces.

The other thing to keep straight is which detection order the list actually comes back in. YOLO detectors return boxes roughly in the order they were found during inference, which usually tracks left-to-right or by confidence rather than anything meaningful about the subjects in the photo - so "index 0" isn't reliably "the leftmost face" or "the largest face" across different images. If your workflow depends on picking a specific person consistently (the tallest face, the one closest to center), you'll want extra logic - BBoxDecompose plus some comparison math - rather than trusting a fixed index to mean the same thing every run.

Categoryface_parsing

Inputs (2)

NameTypeDefaultDescription
bbox_listBBOX_LIST
indexINT0

Outputs (1)

NameTypeDescription
BBOXBBOX