Pose Adaption v5.1.0
Retarget a person's pose to a reference so your garment warper gets the same skeleton
- IMAGE
- BOOLEAN
This is the node that makes garment virtual try-on actually work, and it's the one in this pack with real depth behind it. The idea: when you warp a garment onto a person, the warper does best when the target pose and the reference pose are close - same arm angles, same leg stance. Pose Adaption takes your model's DWPose keypoints and retargets them onto a reference pose: it rotates and rescales each limb to match, swaps in the reference hands, then draws the result as a fresh pose image you can feed to a ControlNet or your warping step.
It reads and writes JSON, does real geometry math, and even ships a torso-similarity gate that tells you when the input pose is too far from the reference to bother. That's more machinery than most nodes in this pack, and it's the kind of thing that separates a try-on pipeline that "sort of works" from one that snaps together.
How it works
Two JSON files in DWPose keypoint format (the 133-point layout: body, face, hands) drive everything. The pack's own tri3d-dwpose preprocessor writes input.json for you; the reference pose comes from your photo or a canned file. The node then:
- Compares torso, shoulder, and hip angles between input and reference. If they differ by more than
rotation_threshold(degrees), it returns a black canvas plussimilar_torso = False- a clean signal to skip the warp or pick a different reference. - Rotates and scales each limb segment (elbows, wrists, knees, ankles) to match the reference's proportions, using shoulder-to-elbow and elbow-to-wrist ratios.
- Replaces the hand keypoints with the reference's hands and repositions them onto the wrists - this is why the output pose has usable hands when the input barely detected any.
- Finally draws the whole thing as a standard colored-skeleton pose image.
The garment_category input (no_sleeve, half_sleeve, full_sleeve, shorts, trouser) tells the algorithm which joints to leave alone - a full-sleeve garment means the elbows are covered, so it doesn't bother matching elbow angles it'll never see.
For the back_fixed* angles, it ignores your reference file and pulls canned back-view poses from the pack's samples/back_poses/ folder (backpose.json, kid/left/right variants) - handy when you're warping from behind.
The inputs that matter
input_pose_json_file- defaults todwpose/keypoints/input.json, the path the pack's own DWPose node writes to. Absolute or pack-relative.ref_pose_json_file- your target pose JSON.image_angle-front, or theback/back_fixed*variants.rotation_threshold(FLOAT, 0–15, default 5) - how much pose divergence you'll tolerate before the node bails. Higher = more forgiving, worse warps.garment_category- tune per garment type as above.
Outputs: an IMAGE (the adapted pose drawing) and a BOOLEAN that tells you whether the torso matched (the code calls it similar_torso) - wire it into a switch to route around bad matches. Note the drawn pose uses OpenCV's standard pose colors, so it drops straight into an OpenPose/DWPose ControlNet.
Installing it
Same pack, same install. ComfyUI Manager → search "tri3d-comfyui-nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/TRI3D-LC/tri3d-comfyui-nodes
cd tri3d-comfyui-nodes
pip install -r requirements.txt
Restart, find it under TRI3D. The DWPose model itself (yzd-v/DWPose) is downloaded on first use by the pack's preprocessor node, not by this one.
Where people get burned
The most common failure is path confusion - the default paths are relative to the pack folder, so if your ComfyUI runs from a different working directory, the open() calls fail with a file-not-found that tells you nothing about which file. Point input_pose_json_file at an absolute path and you're fine. Also, remember a False output isn't a bug: it's the gate working as designed. If you're feeding the black canvas into a ControlNet, you've missed the signal. Run the pack's tri3d-dwpose node first so input.json exists at all.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| input_pose_json_file | STRING | dwpose/keypoints/input.json | — |
| ref_pose_json_file | STRING | dwpose/keypoints/ref-pose.json | — |
| image_angle | COMBO | front | 6 options: front, back, back_fixed_kid, back_fixed, back_fixed_left, back_fixed_right |
| rotation_threshold | FLOAT | 5.000–15 | — |
| garment_category | COMBO | no_sleeve_garment | 5 options: no_sleeve_garment, half_sleeve_garment, full_sleeve_garment, shorts, trouser |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| BOOLEAN | BOOLEAN | — |