Nodes/ComfyUI-Magos-Nodes/Magos Pose Retargeter
ComfyUI Node

Magos Pose Retargeter

Magos Pose Retargeter

By MagosDigitalStudio·Created 5 months ago·Updated 4 months ago· 22
Magos Pose Retargeter
  • pose_data
  • reference_image
  • source_images
  • face_images
  • keyframe_data
  • camera_matrices
  • modified_pose_data
  • preview
  • face_images
  • ref_frame_pose
transfer_facetrue
global_scale1.00
torso_scale_x1.00
torso_scale_y1.00
head_scale_x1.00
head_scale_y1.00
right_arm_scale_x1.00
right_arm_scale_y1.00
left_arm_scale_x1.00
left_arm_scale_y1.00
right_leg_scale_x1.00
right_leg_scale_y1.00
left_leg_scale_x1.00
left_leg_scale_y1.00
global_offset_x0
global_offset_y0
torso_offset_x0
torso_offset_y0
head_offset_x0
head_offset_y0
right_arm_offset_x0
right_arm_offset_y0
left_arm_offset_x0
left_arm_offset_y0
right_leg_offset_x0
right_leg_offset_y0
left_leg_offset_x0
left_leg_offset_y0
face_scale_x1.00
face_scale_y1.00
face_offset_x0
face_offset_y0
torso_rotation0.0
head_rotation0.0
right_arm_rotation0.0
left_arm_rotation0.0
right_leg_rotation0.0
left_leg_rotation0.0
right_hand_scale_x1.00
right_hand_scale_y1.00
right_hand_rotation0.0
left_hand_scale_x1.00
left_hand_scale_y1.00
left_hand_rotation0.0
reference_frame_index0
reference_sourceFrame Index
debug_logfalse
micro_offsets_json{}
disabled_points_json{}
default_hands_json{}
camera_projectionPerspective

Say you captured a performance with Magos DWP Extractor and edited it into shape in the Magos DWP Editor, but the character you're driving is built differently from the person on screen - long arms, short torso, big head. Re-shooting the whole clip is absurd. The Magos Pose Retargeter is the node that fixes proportions in post, by scaling, shifting, and rotating clusters of the skeleton instead of nudging individual joints.

It's from the same Magos Digital Studio pack as the Editor (the VFX studio that open-sourced its animation pipeline), and it's the second half of that "fix janky AI animation" story: edit the pose, then fit it to the character.

How it works

The Retargeter takes a POSEDATA skeleton and applies geometric transforms per body part. Each cluster - torso, head, right/left arm, right/left leg - has scale_x/scale_y, offset_x/offset_y, and rotation controls, plus global_scale and global_offset_x/y for the whole skeleton. Hands get scale and rotation around the wrist; the face has its own scale/offset (and applies to the face pixel crops too if you wire them in).

Two things worth knowing before you get excited:

  • It's DWPose-only. NLF 3D body data passes through untransformed. If you're using the optional NLF model, reshape happens on the 2D DWPose data; edit NLF joints in the Editor's NLF tab instead.
  • Camera-aware mode is the reason it exists. If you set the Editor's render to "Retargeter" and wire keyframe_data + camera_matrices in here, the retargeter applies the cluster transforms in front-space and then projects each frame through the camera (choose camera_projection = Perspective or Orthographic to match). Retargeting after a perspective projection distorts limbs - this avoids that. If you skip camera_matrices, it just behaves as a plain 2D transformer.

The inputs and outputs that matter

Only pose_data is required. The controls you'll actually touch: global_scale (the one you'll move first), transfer_face (whether face transforms hit the output), and reference_source - set it to Ref Frame when you've used the Editor's ⊕ Ref Frame button (a clean, camera-immune snapshot of frame 0) so you're calibrating sliders against a stable reference instead of a camera-distorted frame. reference_frame_index picks which frame to show when the source is Frame Index.

Outputs: modified_pose_data (the retargeted skeleton - feed it into the Magos DWP Renderer), preview (original faded under the retargeted skeleton, so you can see what changed), face_images (face crops with transforms applied), and ref_frame_pose (the ref frame with cluster transforms, ready to preview through a Renderer).

Install

It ships in the ComfyUI-Magos-Nodes pack:

cd ComfyUI/custom_nodes
git clone https://github.com/MagosDigitalStudio/ComfyUI-Magos-Nodes

Restart ComfyUI, and it's under MAGOS Nodes → Retargeting. It needs Kijai's ComfyUI-WanAnimatePreprocess installed for the POSEDATA type. Note the pack is GPL-3.0, in case you're planning to ship a derivative.

Common issues

  • Retargeter seems to do nothing - check you're feeding it POSEDATA from the Editor/Extractor, and remember NLF joints aren't reshaped. Also, transforms are relative to cluster root joints (hips, neck, shoulders), so a small scale_x on a limb with a weird root can look like nothing happened.
  • Preview looks wrong - wire in source_images for a real frame backdrop, and use Ref Frame mode if camera motion is involved. Calibrating sliders against a projected frame will drive you crazy.
  • Settings feel overwhelming - that's because there are roughly forty widgets here. Ignore almost all of them at first: global_scale, maybe a torso offset_y, and you're 90% there.
CategoryMAGOS Nodes/Retargeting

Inputs (57)

NameTypeDefaultDescription
pose_dataPOSEDATA
transfer_faceBOOLEANtrue
global_scaleFLOAT1.000.1–10
torso_scale_xFLOAT1.000.1–10
torso_scale_yFLOAT1.000.1–10
head_scale_xFLOAT1.000.1–10
head_scale_yFLOAT1.000.1–10
right_arm_scale_xFLOAT1.000.1–10
right_arm_scale_yFLOAT1.000.1–10
left_arm_scale_xFLOAT1.000.1–10
left_arm_scale_yFLOAT1.000.1–10
right_leg_scale_xFLOAT1.000.1–10
right_leg_scale_yFLOAT1.000.1–10
left_leg_scale_xFLOAT1.000.1–10
left_leg_scale_yFLOAT1.000.1–10
global_offset_xINT0-3000–3000
global_offset_yINT0-3000–3000
torso_offset_xINT0-3000–3000
torso_offset_yINT0-3000–3000
head_offset_xINT0-3000–3000
head_offset_yINT0-3000–3000
right_arm_offset_xINT0-3000–3000
right_arm_offset_yINT0-3000–3000
left_arm_offset_xINT0-3000–3000
left_arm_offset_yINT0-3000–3000
right_leg_offset_xINT0-3000–3000
right_leg_offset_yINT0-3000–3000
left_leg_offset_xINT0-3000–3000
left_leg_offset_yINT0-3000–3000
face_scale_xFLOAT1.000.1–10
face_scale_yFLOAT1.000.1–10
face_offset_xINT0-3000–3000
face_offset_yINT0-3000–3000
torso_rotationFLOAT0.0-180–180
head_rotationFLOAT0.0-180–180
right_arm_rotationFLOAT0.0-180–180
left_arm_rotationFLOAT0.0-180–180
right_leg_rotationFLOAT0.0-180–180
left_leg_rotationFLOAT0.0-180–180
right_hand_scale_xFLOAT1.000.1–5
right_hand_scale_yFLOAT1.000.1–5
right_hand_rotationFLOAT0.0-180–180
left_hand_scale_xFLOAT1.000.1–5
left_hand_scale_yFLOAT1.000.1–5
left_hand_rotationFLOAT0.0-180–180
reference_frame_indexINT00–9999
reference_sourceCOMBOFrame IndexRef Frame: uses the clean front-view snapshot from the Editor's ⊕ Ref Frame button.
debug_logBOOLEANfalseWrite full trace to CMD + logs/session_*.log
reference_imageoptIMAGE
source_imagesoptIMAGE
face_imagesoptIMAGE
micro_offsets_jsonoptSTRING{}
disabled_points_jsonoptSTRING{}
default_hands_jsonoptSTRING{}
keyframe_dataoptKEYFRAME_DATA
camera_matricesoptCAMERA_MATRICES
camera_projectionoptCOMBOPerspective2 options: Perspective, Orthographic

Outputs (4)

NameTypeDescription
modified_pose_dataPOSEDATA
previewIMAGE
face_imagesIMAGE
ref_frame_posePOSEDATA