Extract pose part v5.1.0
Cut a crop around the torso (or shoulders) so you can regenerate it in place
- image
- image
- coords
Extract pose part is the "cut out a region of the image so you can fix just that region" node in the TRI3D try-on pipeline. It takes an image plus a DWpose JSON (the same height / width / keypoints format the pack's dwpose node writes), rescales the keypoints from JSON space to the real image size, and crops around a body part. The one part it actually implements is the shoulders - flip shoulders on and it crops around the box spanning the left and right shoulder keypoints, then reports where it cut.
That's the whole trick, and it's genuinely useful in a two-pass workflow: crop the torso/shoulder region, run it through an inpaint or a fresh generation pass to fix the garment, then stitch it back onto the original using the coords it hands you. Doing a tight crop instead of regenerating the whole frame keeps the face, hair, and background untouched and saves VRAM at the same time. It's a spatial-variant of the region-then-restore loop the pack's other nodes (fill mask, stitch box to image) complete.
Inputs that matter
image- the full frame you're cropping from.pose_json- file path to the DWpose JSON, defaultdwpose/keypoints/input.json. It's a plain string, so you can hardcode a path or pipe one in.width_padandheight_pad- padding as a percentage of image dimensions, added on both sides of the crop. Default 1 (1%), max 100. This is the knob you'll actually fiddle with: too little padding and you clip the garment edges; too much and the crop is barely smaller than the original.shoulders- boolean. On, you get the shoulder-region crop; off, it returns the whole frame (still with a coords string).
Outputs
Two outputs:
image- the cropped region, ready to feed a sampler or inpaint node.coords- a string in"xmin,xmax,ymin,ymax"form. Keep hold of it; the pack'stri3d-position_pose_partnode consumes it verbatim to paste the crop back in exactly where it came from.
Gotchas
- It reads
keypoints[2]andkeypoints[5]for the shoulders. If the pose detector didn't see both shoulders, the coords come backNoneand it silently falls back to the full frame - check your pose JSON if crops look wrong. - The JSON must have
heightandwidthfields matching the pose detector's output resolution; if they mismatch the source image, the keypoints get stretched wrong and your crop drifts. This is the classic trap, and it's why the pack ships sample JSONs insamples/- mimic their format. - No model involved, no extra install. If the pack loads, this node works.
It's a small, single-purpose helper, but if you're assembling a pose-adaption or garment-editing workflow from this pack, it's one of the load-bearing pieces - and the coords string it produces is the contract the rest of the pipeline depends on.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| pose_json | STRING | dwpose/keypoints/input.json | — |
| width_pad | FLOAT | 1.000–100 | — |
| height_pad | FLOAT | 1.000–100 | — |
| shoulders | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| coords | STRING | — |