Nodes/ComfyUI Body Decal/Body Decal Region
ComfyUI Node

Body Decal Region

Tell the pack where the decal goes — then hand it off to Body Decal Place

By verias·Created 3 months ago·Updated 3 months ago· 1
Body Decal Region
  • image
  • pose_keypoint
  • user_region_mask
  • image
  • region_data
  • region_mask
  • debug_image
placement_region
placement_side
placement_anchor0.20
placement_along_axis0.00
placement_across_axis0.00
region_start_extend0.00
region_end_extend0.35
region_inner_width0.10
region_outer_width0.22
region_feather10
debugtrue

Body Decal Region is the first stop in this pack's modular workflow. Its job is narrow: look at the image, work out where on the body a decal should go, and hand that location to Body Decal Place as a region_data blob. You don't see the result of a region node directly - you see it through the downstream nodes, which is exactly why the debug_image output matters.

The pack's recommended flow is Body Decal Region → Body Decal Place → Body Decal Surface Warp → Body Decal Composite. If all you need is a decal slapped on a character, the all-in-one Body Decal Apply node skips all four of these. Reach for this modular version when you want to tune each stage separately, or when you're reusing one region across several decal candidates.

How it works

Two ways to define the region, and the node picks based on what you feed it.

Pose path. Feed a pose_keypoint from DWPose (a DWPreprocessor, part of the ControlNet Aux preprocessors) and the node detects the largest person, then builds a placement quad around a chosen body part. placement_region picks the part - nose, neck_side, upper_arm, forearm, thigh, lower_leg, torso_side, torso_front - and placement_side picks viewer_left or viewer_right from the viewer's perspective. The quad is a four-point trapezoid aligned to the body-part axis (shoulder→elbow for upper arm, hip→knee for thigh), so the downstream warp can rotate and project correctly.

Mask path. Skip pose entirely by feeding a user_region_mask. The node computes the mask's bounding box and builds a region from it. This is the path for clothing, props, armor, background objects, or anything the pose detector has no concept of - the README lists it as the manual-region escape hatch, and it's genuinely useful.

Either way the axis math is the same: an anchor point slides along the axis via placement_anchor (0 = top of the part, 1 = bottom), placement_along_axis and placement_across_axis nudge it further, and the four region_* controls (region_start_extend, region_end_extend, region_inner_width, region_outer_width) shape the quad. region_feather softens the mask edge in pixels.

Inputs and outputs

The widgets you'll actually touch are placement_region, placement_side, and region_feather. The rest of the placement/region knobs are fine-tuning - leave them at defaults until the debug view tells you the quad is aimed wrong.

Outputs:

  • region_data (BODY_DECAL_REGION) - the packed geometry; wire this into Body Decal Place.
  • region_mask (MASK) - the feathered quad as a mask, handy if you want to inspect or reuse it.
  • debug_image - the base image with the axis, anchor points, and quad drawn on it. Turn debug on, look at this first, always.
  • image - a pass-through of the input, so you can chain nodes without extra wires.

Gotchas

Same silent failure as the rest of this pack: if no person is detected (pose path) or the mask is too small (mask path, needs roughly a 10x10 minimum), you get an empty region_data and an all-black region_mask, and downstream Body Decal Place will happily output an empty layer. If a decal mysteriously vanishes, check the debug view before you blame the blend mode. Install is the usual Manager search for "ComfyUI Body Decal", or git clone https://github.com/verias/comfyui-body-decal.git into ComfyUI/custom_nodes and restart - dependencies are just numpy and Pillow, auto-installed.

Categoryimage/postprocessing/body decal

Inputs (14)

NameTypeDefaultDescription
imageIMAGE
placement_regionCOMBO8 options: nose, neck_side, upper_arm, forearm, thigh, lower_leg, +2
placement_sideCOMBO2 options: viewer_left, viewer_right
placement_anchorFLOAT0.200–1
placement_along_axisFLOAT0.00-2–2
placement_across_axisFLOAT0.00-2–2
region_start_extendFLOAT0.00-1–1
region_end_extendFLOAT0.35-1–2
region_inner_widthFLOAT0.100–1
region_outer_widthFLOAT0.220–1.5
region_featherINT100–80
debugBOOLEANtrue
pose_keypointoptPOSE_KEYPOINT
user_region_maskoptMASK

Outputs (4)

NameTypeDescription
imageIMAGE
region_dataBODY_DECAL_REGION
region_maskMASK
debug_imageIMAGE