Nodes/comfyui_face_parsing/BBoxDetect(FaceParsing)
ComfyUI Node

BBoxDetect(FaceParsing)

FaceBBoxDetect's more tunable sibling

By Ryuukeisyou·Created 3 years ago·Updated about a year ago· 193
BBoxDetect(FaceParsing)
  • bbox_detector
  • image
  • BBOX_LIST
  • count
threshold0.30
dilation8
dilation_ratio0.20
by_ratiofalse

This is the same job as FaceBBoxDetect - run the YOLO face detector, get back a list of boxes - but with two extra dials for how the padding around each box is computed, plus a bonus output telling you how many faces it found. If FaceBBoxDetect is the quick, get-a-box-per-face node, BBoxDetect is the one you reach for when you want the padding to scale with the face's own size instead of being a flat pixel amount.

The inputs that matter

  • bbox_detector (BBOX_DETECTOR) - from BBoxDetectorLoader.
  • image (IMAGE) - the image to detect faces in.
  • threshold (FLOAT, default 0.3, range 0–1) - same confidence cutoff as FaceBBoxDetect. Lower it if faces are getting missed, raise it if you're getting false hits.
  • dilation (INT, default 8, range -512 to 512) - flat pixel padding, same as FaceBBoxDetect.
  • dilation_ratio (FLOAT, default 0.2, range 0–1) - padding as a fraction of the box's own size, instead of a fixed pixel count. Only kicks in when by_ratio is on.
  • by_ratio (BOOLEAN, default false) - switches which padding mode is actually used. Off (default), you get the flat-pixel dilation behavior, same as FaceBBoxDetect. On, padding scales with dilation_ratio relative to each box's size - which matters a lot on images with a mix of large and small faces, where a flat 8px pad is generous on a small face and barely noticeable on a big one.

The outputs are BBOX_LIST (the detected, padded boxes) and count (an INT - how many faces it found). That count is genuinely useful on its own: wire it into a switch or a conditional to branch your workflow depending on whether zero, one, or several faces turned up, rather than just discovering it downstream when a crop node chokes on an empty list.

When to reach for this over FaceBBoxDetect

If every image you process has one clearly sized face, they're functionally interchangeable and FaceBBoxDetect is simpler to look at. Reach for BBoxDetect when you're batch-processing images with varied face sizes and want consistent proportional padding, or when you specifically want that count output to drive logic elsewhere in the graph.

Installing it

Bundled with the 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.

Needs the face_yolov8m.pt detector weights already downloaded (handled automatically by BBoxDetectorLoader on first run).

Common issues

Same detection blind spots as FaceBBoxDetect: small, angled, or stylized faces can slip under the default threshold of 0.3, and an empty BBOX_LIST is the usual symptom. The one mistake specific to this node is flipping by_ratio on and then being confused why padding behaves differently than you expect - that toggle changes which of the two padding values actually drives the result. If your crops suddenly look way tighter or looser than before, check which mode you're in and adjust the matching value (dilation for flat pixels, dilation_ratio for proportional).

Categoryface_parsing

Inputs (6)

NameTypeDefaultDescription
bbox_detectorBBOX_DETECTOR
imageIMAGE
thresholdFLOAT0.300–1
dilationINT8-512–512
dilation_ratioFLOAT0.200–1
by_ratioBOOLEANfalse

Outputs (2)

NameTypeDescription
BBOX_LISTBBOX_LIST
countINT