ComfyUI Node

YOLO BBox Extractor

The node that lets ComfyUI's official SDPose handle more than one person

By judian17·Created 6 months ago·Updated 6 months ago· 52
YOLO BBox Extractor
  • yolo_model
  • images
  • BOUNDING_BOX
confidence_threshold0.50

ComfyUI's official SDPose keypoint extractor is perfectly happy detecting one person from a full frame. Ask it for two, or five, or a whole crowd, and it quietly gives you one - because SDPose is a detect-then-regress pipeline: it wants a bounding box per person before it estimates any keypoints. The official node's own tooltip spells it out: the bboxes input is "Required for multi-person detection." So the real multi-person pose problem in ComfyUI isn't pose estimation at all - it's finding the boxes. That's the job BBoxYOLO was written for, and it's the missing half of the workflow the official nodes deliberately leave to you.

What it does

BBoxYOLO runs an ultralytics YOLO detection pass over your image (or each frame of a batch), keeps every detection whose class is 0 - that's "person" on the standard COCO-trained weights - and whose confidence clears your threshold, then converts each box from xyxy into the {x, y, width, height} dict format the official SDPose nodes consume. It returns one list of boxes per frame, so a batched image input produces a matching set of per-frame bounding boxes. The output type is BOUNDING_BOX, which is exactly the wire format SDPoseKeypointExtractor accepts on its bboxes input.

That format match is the whole trick. This is a two-node pack (loader + detector) whose only job is to speak the official SDPose's native bbox language, so the output plugs straight in with zero conversion nodes.

The inputs that matter

Three inputs, and you'll touch basically one of them:

  • yolo_model - the YOLO_MODEL output of the pack's YOLOModelLoader. Nothing else works; there's no default.
  • images - any IMAGE tensor, e.g. from a Load Image or a video-frame sequence.
  • confidence_threshold (default 0.5, range 0–1, step 0.05) - the knob you'll actually reach for. Raised if you're getting phantom boxes, lowered toward 0.3–0.4 when people are small, partly occluded, or in a crowd. Full-body single-subject shots rarely need touching it.

Wiring it into SDPose

Load an image → YOLOModelLoaderBBoxYOLO → feed the BOUNDING_BOX output into SDPoseKeypointExtractor's bboxes input alongside the same image, then run the keypoints through SDPose Draw Keypoints and into your ControlNet/OpenPose conditioning as usual. The pack's README is one line plus an example screenshot, and that screenshot is exactly this chain. You're swapping the official full-frame detection for a per-person one - expect roughly one YOLO pass plus one SDPose diffusion pass per detected person, which is the honest cost of doing multi-person properly.

Install

Via ComfyUI Manager (search "ComfyUI_YOLO_For_Multi_SDPose_Detection"), or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/judian17/ComfyUI_YOLO_For_Multi_SDPose_Detection

Restart ComfyUI. The pack's requirements.txt installs ultralytics and numpy - ultralytics drags in torch, torchvision, and OpenCV, so the first Manager install can be slow.

Where people get burned

  • No model file → empty dropdown, nothing detected. The pack downloads no weights. Drop a YOLO .pt (yolov8n.pt is plenty for this job) into ComfyUI/models/yolo first - see the loader article.
  • Custom-class YOLO weights. Class 0 is hardcoded as person. If you load a model trained on other classes, it silently returns zero boxes - no error, just nothing.
  • Threshold too high is the quiet one. 0.5 drops a lot of small or cropped people; that's why the step is 0.05 and the knob exists.
CategorySDPose/Utils

Inputs (3)

NameTypeDefaultDescription
yolo_modelYOLO_MODEL
imagesIMAGE
confidence_thresholdFLOAT0.500–1

Outputs (1)

NameTypeDescription
BOUNDING_BOXBOUNDING_BOX