Sapiens2 Pose Advanced
Sapiens2's Advanced Pose Node
- model
- image
- bboxes
- pose_image
- preview
- keypoint_mask
- openpose_json
- result
If you've ever stared at a pose-estimation workflow and asked "okay, but what do I do with this," you're not alone - it's the recurring question under every Sapiens2 launch thread. The answer, in one line: a pose skeleton is the cheapest, most reliable way to tell a diffusion model where the person is and how they're standing. Feed a pose image into an OpenPose ControlNet and you can re-render a character in any style while keeping the exact stance; hand the JSON to animation or mocap tooling and you've got a motion reference that's already extracted for you.
Sapiens2 Pose Advanced is where this pack's pose work happens with the training wheels off. It runs Meta's Sapiens2 pose model - 308 keypoints - through a person detector and renders the result into whatever format your downstream tool actually wants.
How it works
First a person detector finds bounding boxes (it prefers a local rtmdet_m.pth if you have one under ComfyUI/models/sapiens2/detector/, otherwise falls back to a Hugging Face DETR model). Then the Sapiens2 keypoint model predicts 308 keypoints per person. Three thresholds filter the mess: bbox_threshold and nms_threshold decide which detected people survive, keypoint_threshold decides which keypoints are confident enough to keep. flip_test (on by default) runs a mirrored inference pass and averages the two, which is a genuinely worthwhile accuracy boost for poses seen from the side. Finally the node converts the 308-keypoint raw output into the target you picked and renders the OpenPose-style stick figure.
The inputs that matter
target- the format.BODY_25(OpenPose's 25-keypoint body),DWPose(the detector flavor ControlNet people actually prefer, and it fills in hands and face too),308-keypoint(Sapiens2's native superset),COCO_18, plusOpenPose hand 21 + 21andOpenPose face 70. Pick the one your downstream node speaks;BODY_25is the safe default.keypoint_threshold- raise it to 0.4–0.5 if you're getting jittery keypoints on low-res images.fallback_full_image_bbox- if the detector finds nobody, treat the whole frame as one person instead of returning nothing. Leave it on for a single subject.radius/thickness- how big the rendered dots and bones are. Cosmetic, but they're the first thing you tweak when the skeleton looks lost in a big frame.
Optional bboxes input lets you feed back detection from a previous run instead of re-running the person detector - a real speedup when iterating on a batch.
The outputs
pose_image- the black-background stick figure. This is the one you feed into OpenPose ControlNet.preview- the same skeleton overlaid on the source.keypoint_mask- a mask of the detected joints, if you want to combine pose with masking logic.openpose_json- a string of JSON in the target's layout (forDWPosethat meanspose_keypoints_2dplus hand/face arrays; Sapiens2's raw keypoints are kept assapiens_keypoints_2d). Wire it to a save node and you have pose data on disk for animation reference.result- aSAPIENS2_POSE_RESULTwith the raw keypoint tensors and boxes.
Installing it
It's part of Bogyie/ComfyUI-Sapiens2-Easy, so:
cd ComfyUI/custom_nodes
git clone https://github.com/Bogyie/ComfyUI-Sapiens2-Easy.git
cd ComfyUI-Sapiens2-Easy
python install.py
Restart ComfyUI (or install via Manager). Feed it a Sapiens2 Model Loader set to task = pose; the loader auto-downloads the pose weights on first run. One honest gotcha: the preferred RTMDet detector needs mmdet/mmengine/mmcv, which this pack deliberately does not auto-install because those packages can interfere with your torch/CUDA stack. You don't need them - the DETR fallback works out of the box - but if you want the faster detector, install the mm packages yourself only after checking they match your environment.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| model | SAPIENS2_MODEL | — | |
| image | IMAGE | — | |
| target | COMBO | BODY_25 | 6 options: BODY_25, DWPose, 308-keypoint, COCO_18, OpenPose hand 21 + 21, OpenPose face 70 |
| keypoint_threshold | FLOAT | 0.300–1 | — |
| bbox_threshold | FLOAT | 0.300–1 | — |
| nms_threshold | FLOAT | 0.300–1 | — |
| radius | INT | 41–64 | — |
| thickness | INT | 21–64 | — |
| fallback_full_image_bbox | BOOLEAN | true | — |
| flip_test | BOOLEAN | true | — |
| show_points | BOOLEAN | true | — |
| show_skeleton | BOOLEAN | true | — |
| bboxesopt | SAPIENS2_BBOXES | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| pose_image | IMAGE | — |
| preview | IMAGE | — |
| keypoint_mask | MASK | — |
| openpose_json | STRING | — |
| result | SAPIENS2_POSE_RESULT | — |