Nodes/ComfyUI-WanVideoWrapper/WanVideo UniAnimate DWPose Detector
ComfyUI Node Runs on cloud

WanVideo UniAnimate DWPose Detector

Skeletons for driving Wan character motion

By kijai·Created about a year ago·Updated 3 months ago· 6,654
WanVideo UniAnimate DWPose Detector
  • pose_images
  • reference_pose_image
  • poses
  • reference_pose
score_threshold0.30
stick_width4
draw_bodytrue
body_keypoint_size4
draw_feettrue
draw_handstrue
hand_keypoint_size4
colorspace
handle_not_detectedempty
draw_headtrue

If you want a character in your Wan clip to move exactly like a reference video - same gestures, same walk, same dance - you drive it with a pose signal, and this node builds that signal. It runs DWPose detection over your input frames and draws the classic stick-figure skeleton: body, hands, feet, head. Those pose frames are what UniAnimate uses to puppet the generated character. Feed it a video of someone dancing and you get back a sequence of skeletons; wire those into your Wan animation pipeline and your character dances the same way.

DWPose is the community-standard pose extractor for exactly this reason - it's what VACE and the older AnimateDiff control workflows leaned on too. This node is the WanVideoWrapper flavor, tuned to output what UniAnimate expects.

How it works

DWPose detects human keypoints per frame - joints, hand points, facial landmarks - and this node renders them as a drawn skeleton on a blank canvas. That drawn pose, not the original video, is what conditions the model, which is why you get precise motion transfer without dragging the reference person's appearance along with it. You control which parts get drawn and how thick, plus a confidence threshold for filtering shaky detections.

The inputs and outputs that matter

  • pose_images (IMAGE) - your driving frames, the video whose motion you want to copy.
  • score_threshold (default 0.3) - the confidence floor for keeping a detected keypoint. Raise it if the skeleton is jittering on bad detections; lower it if limbs keep dropping out.
  • draw_body / draw_hands / draw_feet / draw_head (all on by default) - toggle which parts of the skeleton get drawn. Hands are the expensive, error-prone part; turn them off if they're producing garbage and you don't need finger detail.
  • stick_width, body_keypoint_size, hand_keypoint_size - cosmetic sizing of the drawn skeleton.
  • handle_not_detected (empty / repeat) - what to do on a frame where no pose is found: draw nothing, or repeat the last good pose. repeat avoids jarring gaps when detection briefly fails.
  • reference_pose_image (optional) - a reference pose to align against.

Outputs: poses (IMAGE, the skeleton sequence) and reference_pose (IMAGE).

How to install it

ComfyUI Manager - search ComfyUI-WanVideoWrapper, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt

then restart. DWPose needs its detection models (the pose and detection ONNX/torch weights) - these download on first use or ship with the pack's model set; if detection silently produces empty frames, that's the usual missing-model culprit.

Common issues & troubleshooting

All-black or empty pose frames. Either no person was detected (check score_threshold isn't cranked too high, and that your subject is actually visible), or the DWPose detection models aren't installed. Set handle_not_detected to repeat to bridge occasional dropouts, but a fully empty output means the detector isn't finding anyone.

Hand skeletons are a mess. Hand keypoints are the least reliable part of DWPose, especially on fast motion or low resolution. If bad hands are corrupting your output, just set draw_hands: false - a clean body skeleton often drives better than a body-plus-broken-hands one.

Motion transfers but the depth feels wrong. That's an inherent limit of skeleton-based control - turning motion into a stick figure throws away depth and contact information before the model ever sees it. It's the exact tradeoff newer skeleton-free approaches were built to avoid, but for a pose-driven Wan pipeline, DWPose is still the standard input.

CategoryWanVideoWrapper

Inputs (12)

NameTypeDefaultDescription
pose_imagesIMAGEPose images
score_thresholdFLOAT0.300–1Score threshold for pose detection
stick_widthINT41–100Stick width for drawing keypoints
draw_bodyBOOLEANtrueDraw body keypoints
body_keypoint_sizeINT40–100Body keypoint size
draw_feetBOOLEANtrueDraw feet keypoints
draw_handsBOOLEANtrueDraw hand keypoints
hand_keypoint_sizeINT40–100Hand keypoint size
colorspaceCOMBOColor space for the output image
handle_not_detectedCOMBOemptyHow to handle undetected poses, empty inserts black and repeat inserts previous detection
draw_headBOOLEANtrueDraw head keypoints
reference_pose_imageoptIMAGEReference pose image

Outputs (2)

NameTypeDescription
posesIMAGE
reference_poseIMAGE