Nodes/Eric Composer Studio/Pose Canvas Crop/Fit
ComfyUI Node

Pose Canvas Crop/Fit

Reframe a pose without distorting the person

By EricRollei·Created 5 months ago·Updated 4 months ago· 3
Pose Canvas Crop/Fit
  • pose_keypoint
  • pose_keypoint
modefit_to_ratio
output_width1024
output_height1024
crop_x0
crop_y0
crop_w0
crop_h0
pad_left0
pad_top0
pad_right0
pad_bottom0

Here's a situation you'll meet constantly: you detected a pose from a 4256×2832 photo, but you're generating at 1024×1024. If you just stretch the pose to fit, the proportions bend, and ControlNet will happily render you a person who's been through a funhouse mirror. The correct move is to change the framing - crop or pad the canvas - while leaving the person's proportions untouched. That's exactly what Pose Canvas Crop/Fit does.

How it works

It's pure coordinate transformation, with no re-running inference. The node takes the existing keypoint data, rescales it from the source photo's canvas onto a new output_width × output_height, and does it the way you'd reframe a photo rather than stretch one. The person's skeleton keeps its internal geometry; only the visible region changes.

The modes

  • fit_to_ratio - letterboxes or pillarboxes the pose to match the target aspect. Start here. It's the safe default: nothing gets cut off, and ControlNet sees the whole person.
  • crop_to_ratio - centre-crops to the target aspect. Trims edges, which is right when you want a tighter framing on a subject that fills too much of the source.
  • crop - a manual crop rectangle: crop_x, crop_y, crop_w, crop_h (set crop_w/crop_h to 0 to mean "to the edge").
  • pad - explicit margins: pad_left, pad_top, pad_right, pad_bottom, which add canvas space around the pose.

Inputs and outputs

Required: pose_keypoint, mode, output_width, output_height (64–8192, stepped by 8 - defaults 1024²). The rest of the inputs only matter per mode, as above. There's exactly one output: pose_keypoint, rescaled to the new canvas dimensions, ready to feed a Pose Renderer.

The typical chain this slots into: detect → crop/fit to your generation ratio → (optionally) Pose Transform to nudge the subject within the frame → render with keep_input_size=true → ControlNet.

Installing it

Standard for this pack: ComfyUI Manager → search Eric Composer Studio → install → restart, or git clone https://github.com/EricRollei/Eric_Composer_Studio.git into custom_nodes and pip install -r requirements.txt. It operates purely on POSE_KEYPOINT data, so it's instant and needs no models - just make sure comfyui_controlnet_aux is installed so the socket type exists.

Where people get burned

The most common mistake is reaching for Pose Transform (with its tempting scale knob) to "fit" a pose to a canvas. Scale changes the person's size; that's not what fixing a mismatch between a source photo and a generation canvas requires. Crop/fit is the framing fix, and doing it before transforms means you're thinking about it in the right order: get the canvas right first, then place the person within it.

CategoryEric_Composer_Studio

Inputs (12)

NameTypeDefaultDescription
pose_keypointPOSE_KEYPOINT
modeCOMBOfit_to_ratio4 options: crop, pad, fit_to_ratio, crop_to_ratio
output_widthINT102464–8192
output_heightINT102464–8192
crop_xoptINT00–8192
crop_yoptINT00–8192
crop_woptINT00–81920 = use source width - crop_x
crop_hoptINT00–81920 = use source height - crop_y
pad_leftoptINT00–4096
pad_topoptINT00–4096
pad_rightoptINT00–4096
pad_bottomoptINT00–4096

Outputs (1)

NameTypeDescription
pose_keypointPOSE_KEYPOINT