Nodes/Mickmumpitz-Nodes/OpenPose Part Mask
ComfyUI Node

OpenPose Part Mask

Build a rectangular mask around an OpenPose region. Feed it into InpaintCrop (crop-and-stitch) or any inpaint/detailer node.

By mickmumpitz·Created 7 months ago·Updated about 14 hours ago· 39
OpenPose Part Mask
  • image
  • pose_keypoint
  • mask
  • x
  • y
  • width
  • height
regionright_hand
person_index0
padding1.30
make_squarefalse
min_size64
mask_blur0
mirror_left_rightfalse
confidence0.05
person_orderdetection
keypoint_indices
CategoryMickmumpitz/OpenPosePartCropper

Inputs (12)

NameTypeDefaultDescription
imageIMAGE
pose_keypointPOSE_KEYPOINT
regionCOMBOright_handLeft/right are anatomical (the subject's own side). 'right_hand' is the person's right hand, which usually appears on the LEFT of the image. Enable mirror_left_right if you prefer image-space sides.
person_indexoptINT00–64
paddingoptFLOAT1.301–4Expand the box around the region (1.0 = tight).
make_squareoptBOOLEANfalse
min_sizeoptINT648–4096
mask_bluroptINT00–256Feather the mask edges.
mirror_left_rightoptBOOLEANfalseLeft/right are anatomical (the subject's own side). 'right_hand' is the person's right hand, which usually appears on the LEFT of the image. Enable mirror_left_right if you prefer image-space sides.
confidenceoptFLOAT0.050–1
person_orderoptCOMBOdetectionHow person_index is ordered when there are multiple characters. 'detection' = the detector's raw order (unstable between frames). 'left_right' = index 0 is the leftmost character, 1 the next, etc. Use left_right for a stable 2-character setup.
keypoint_indicesoptSTRINGCrop a box enclosing these BODY keypoint numbers instead of the named region. Leave empty to use 'region'. Examples: '4' | '2,3,4' | '2-4'. BODY_18: 0 nose, 1 neck, 2 R-shoulder, 3 R-elbow, 4 R-wrist, 5 L-shoulder, 6 L-elbow, 7 L-wrist, 8 R-hip, 9 R-knee, 10 R-ankle, 11 L-hip, 12 L-knee, 13 L-ankle, 14 R-eye, 15 L-eye, 16 R-ear, 17 L-ear. (R/L are the subject's anatomical sides.)

Outputs (5)

NameTypeDescription
maskMASK
xINT
yINT
widthINT
heightINT