Nodes/ComfyUI-WanViTPoseRetargeter/WanViTPoseRetargeterToSrc
ComfyUI Node

WanViTPoseRetargeterToSrc

The Wan Animate retargeter with a scale knob and a place-it-by-hand dial

By red-polo·Created 11 months ago·Updated 11 months ago· 8
WanViTPoseRetargeterToSrc
  • images
  • ref_image
  • cond_images
adjust_scale1.00
adjust_scale_ankerneck
adjust_x0
adjust_y0

If WanViTPoseRetargeter is the auto-fit version of this pipeline, WanViTPoseRetargeterToSrc is the same thing with training wheels you actually steer. "ToSrc" means the reference character keeps its own proportions - the source character stays the source - while the driving video's motion gets grafted on. This is the node the pack's README frames as "replace the character in the video with the reference character." And because auto-fitting proportions doesn't always land, it hands you four manual knobs to fix what the math got wrong.

How it works

Same machinery as the main node: YOLOv10m finds the person, ViTPose wholebody extracts a body-plus-hands-plus-face skeleton, and the retarget step recomputes the driving skeleton using the reference character's per-bone proportions while keeping every joint angle. Same two ONNX models, same black-canvas stick-figure output that Wan2.2-Animate's conditioning expects. The difference is what happens after the retarget: instead of trusting the automatic fit, you can scale and shift the whole pose by hand.

The inputs that matter

Like the main node you've got:

  • images - the driving video frames.
  • ref_image - the reference character.

Then the four knobs, all with sensible defaults (adjust_scale 1.0, adjust_scale_anker "neck", adjust_x/adjust_y 0):

  • adjust_scale - a multiplier for the overall size of the retargeted pose. 1.0 is neutral; nudge it when the character comes out too big or too small for the scene.
  • adjust_scale_anker - the anchor point for that scaling. "neck" scales around the neck, so the head stays put; "around foot" scales around the feet, keeping the character grounded on the floor. Pick based on what you want to stay fixed while everything else resizes.
  • adjust_x / adjust_y - translate the pose horizontally and vertically (in pixels, range ±2000). For when the fitted character is centered wrong, standing too far left, or floating above the ground line.

Output is the usual cond_images - the pose sequence that feeds the Wan Animate sampler in Kijai's ComfyUI-WanVideoWrapper.

Install

Identical to the pack, because it is the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/red-polo/ComfyUI-WanViTPoseRetargeter.git
python -m pip install -r requirements.txt

Then download yolo10m.onnxmodels/det/ and vitposeh_wholebody.onnxmodels/pose2d/ from Wan-AI/Wan2.2-Animate-14B on HuggingFace, and restart ComfyUI. Missing files give you a RuntimeError: ... is not existed! - the code checks the model paths explicitly, so that error is never a mystery.

Where people get burned

The knobs are manual tuning, and manual tuning means iterating. The anchor choice matters more than it looks: if your character's head drifts while scaling, switch the anchor to "neck"; if the character starts floating above the floor, that's an adjust_y fix. And the README flags this whole pack as early-stage - behavior can change between versions, so if a previously working workflow starts acting up, check for a pack update first. Also remember the inputs need actual detectable people: no person in the frame, no pose, and the conditioning comes back empty rather than erroring.

CategoryWanViTPoseRetargeter

Inputs (6)

NameTypeDefaultDescription
imagesIMAGEInput image for pose detection
ref_imageIMAGEInput reference image
adjust_scaleFLOAT1.000.01–100大きさをスケールする
adjust_scale_ankerCOMBOnecktarget_to_srcがTrueの時のみ有効
adjust_xFLOAT0-2000–2000x方向に移動させる
adjust_yFLOAT0-2000–2000y方向に移動させる

Outputs (1)

NameTypeDescription
cond_imagesIMAGE