Magos Pose Retargeter
Magos Pose Retargeter
- pose_data
- reference_image
- source_images
- face_images
- keyframe_data
- camera_matrices
- modified_pose_data
- preview
- face_images
- ref_frame_pose
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
renderto "Retargeter" and wirekeyframe_data+camera_matricesin here, the retargeter applies the cluster transforms in front-space and then projects each frame through the camera (choosecamera_projection= Perspective or Orthographic to match). Retargeting after a perspective projection distorts limbs - this avoids that. If you skipcamera_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
POSEDATAfrom the Editor/Extractor, and remember NLF joints aren't reshaped. Also, transforms are relative to cluster root joints (hips, neck, shoulders), so a smallscale_xon a limb with a weird root can look like nothing happened. - Preview looks wrong - wire in
source_imagesfor 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 torsooffset_y, and you're 90% there.
Inputs (57)
| Name | Type | Default | Description |
|---|---|---|---|
| pose_data | POSEDATA | — | |
| transfer_face | BOOLEAN | true | — |
| global_scale | FLOAT | 1.000.1–10 | — |
| torso_scale_x | FLOAT | 1.000.1–10 | — |
| torso_scale_y | FLOAT | 1.000.1–10 | — |
| head_scale_x | FLOAT | 1.000.1–10 | — |
| head_scale_y | FLOAT | 1.000.1–10 | — |
| right_arm_scale_x | FLOAT | 1.000.1–10 | — |
| right_arm_scale_y | FLOAT | 1.000.1–10 | — |
| left_arm_scale_x | FLOAT | 1.000.1–10 | — |
| left_arm_scale_y | FLOAT | 1.000.1–10 | — |
| right_leg_scale_x | FLOAT | 1.000.1–10 | — |
| right_leg_scale_y | FLOAT | 1.000.1–10 | — |
| left_leg_scale_x | FLOAT | 1.000.1–10 | — |
| left_leg_scale_y | FLOAT | 1.000.1–10 | — |
| global_offset_x | INT | 0-3000–3000 | — |
| global_offset_y | INT | 0-3000–3000 | — |
| torso_offset_x | INT | 0-3000–3000 | — |
| torso_offset_y | INT | 0-3000–3000 | — |
| head_offset_x | INT | 0-3000–3000 | — |
| head_offset_y | INT | 0-3000–3000 | — |
| right_arm_offset_x | INT | 0-3000–3000 | — |
| right_arm_offset_y | INT | 0-3000–3000 | — |
| left_arm_offset_x | INT | 0-3000–3000 | — |
| left_arm_offset_y | INT | 0-3000–3000 | — |
| right_leg_offset_x | INT | 0-3000–3000 | — |
| right_leg_offset_y | INT | 0-3000–3000 | — |
| left_leg_offset_x | INT | 0-3000–3000 | — |
| left_leg_offset_y | INT | 0-3000–3000 | — |
| face_scale_x | FLOAT | 1.000.1–10 | — |
| face_scale_y | FLOAT | 1.000.1–10 | — |
| face_offset_x | INT | 0-3000–3000 | — |
| face_offset_y | INT | 0-3000–3000 | — |
| torso_rotation | FLOAT | 0.0-180–180 | — |
| head_rotation | FLOAT | 0.0-180–180 | — |
| right_arm_rotation | FLOAT | 0.0-180–180 | — |
| left_arm_rotation | FLOAT | 0.0-180–180 | — |
| right_leg_rotation | FLOAT | 0.0-180–180 | — |
| left_leg_rotation | FLOAT | 0.0-180–180 | — |
| right_hand_scale_x | FLOAT | 1.000.1–5 | — |
| right_hand_scale_y | FLOAT | 1.000.1–5 | — |
| right_hand_rotation | FLOAT | 0.0-180–180 | — |
| left_hand_scale_x | FLOAT | 1.000.1–5 | — |
| left_hand_scale_y | FLOAT | 1.000.1–5 | — |
| left_hand_rotation | FLOAT | 0.0-180–180 | — |
| reference_frame_index | INT | 00–9999 | — |
| reference_source | COMBO | Frame Index | Ref Frame: uses the clean front-view snapshot from the Editor's ⊕ Ref Frame button. |
| debug_log | BOOLEAN | false | Write full trace to CMD + logs/session_*.log |
| reference_imageopt | IMAGE | — | |
| source_imagesopt | IMAGE | — | |
| face_imagesopt | IMAGE | — | |
| micro_offsets_jsonopt | STRING | {} | — |
| disabled_points_jsonopt | STRING | {} | — |
| default_hands_jsonopt | STRING | {} | — |
| keyframe_dataopt | KEYFRAME_DATA | — | |
| camera_matricesopt | CAMERA_MATRICES | — | |
| camera_projectionopt | COMBO | Perspective | 2 options: Perspective, Orthographic |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| modified_pose_data | POSEDATA | — |
| preview | IMAGE | — |
| face_images | IMAGE | — |
| ref_frame_pose | POSEDATA | — |