ComfyUI Node

Draw ViT Pose

Turn pose data into the stick figures Wan Animate is conditioned on

By kijai·Created 11 months ago·Updated 3 months ago· 545
Draw ViT Pose
  • pose_data
  • pose_images
width832
height480
retarget_padding16
body_stick_width-1
hand_stick_width-1
draw_headTrue

If Pose and Face Detection is the engine of this pack, Draw ViT Pose is the painter. It takes the skeleton data that detection produced and renders it as actual images - white stick figures on a black canvas, one per frame - which is what Wan Animate is literally conditioned on. The model doesn't read "the person raised their left arm"; it reads pixels. This node draws those pixels.

It's the last preprocess step before generation in the pack's example workflow, and it's also the node where you have the most visual control over what the Animate model "sees." The pose images you draw here are the motion blueprint, so getting them to look right is the difference between a dance that transfers cleanly and one that spaghettifies.

How it works

It takes the POSEDATA from Pose and Face Detection, and for every frame's keypoints it draws onto a black canvas at the resolution you specify. Body parts become stick segments, hands get their own finer sticks (ViTPose tracks all 21 per hand), and the head is drawn as keypoints. The two width inputs let you fatten or drop parts: set a stick width to 0 and that whole group isn't drawn.

The one non-obvious piece is retarget_padding. When you've used a retarget_image in detection, the retargeted skeleton can end up smaller or off-center relative to the frame - the motion was remapped onto a reference character's proportions, after all. With retarget_padding > 0 (default 16), the node pads the drawing and resizes it to fit the target dimensions with that margin, so the whole body stays in frame. With padding at 0, it just pads/resizes without that fit step.

Inputs a beginner actually sets

  • pose_data - from Pose and Face Detection.
  • width / height - the generation resolution. Match what you set in detection and what the Animate model will sample at.
  • retarget_padding - 16 by default. Raise it if the retargeted character gets clipped at the canvas edges; lower it if there's too much empty border.
  • body_stick_width / hand_stick_width - default -1 means "auto" thickness. 0 disables body or hand drawing entirely, which is useful if the model keeps mangling hands and you want to give it nothing to overfit on.
  • draw_head - whether to draw the head keypoints at all.

The single output, pose_images, feeds the pose input of the Wan Animate / One-to-All model (in the example workflow it's concatenated with the face/body mask images before going in).

Where it sits in the workflow

A note on conventions: if you've used DW Pose or OpenPose preprocessors for image ControlNet before (the KB's ControlNet guide covers the same idea), this is the Wan-flavored version - same stick-figure concept, different keypoint layout, trained to Wan Animate's expectations. Don't swap one for the other; the Animate model wants these renderings.

Gotchas

Padding does nothing without retargeting. retarget_padding only kicks in when the incoming pose_data actually contains a retargeted reference image. In a plain motion-transfer workflow it's a no-op, so don't fiddle with it expecting a framing change.

Width/height mismatch is a silent killer. If this node draws at 832×480 but you later sample at a different resolution, the pose conditioning won't line up with the latent. Keep detection, drawing, and sampling on the same dimensions.

Hands are usually the thing that looks off. If the output's hands look like noodles, it's worth testing hand_stick_width = 0 once just to see how much of the problem was the conditioning versus the model. Sometimes less skeleton is more stable.

CategoryWanAnimatePreprocess

Inputs (7)

NameTypeDefaultDescription
pose_dataPOSEDATA
widthINT83264–2048Width of the generation
heightINT48064–2048Height of the generation
retarget_paddingINT160–512When > 0, the retargeted pose image is padded and resized to the target size
body_stick_widthINT-1-1–20Width of the body sticks. Set to 0 to disable body drawing, -1 for auto
hand_stick_widthINT-1-1–20Width of the hand sticks. Set to 0 to disable hand drawing, -1 for auto
draw_headBOOLEANTrueWhether to draw head keypoints

Outputs (1)

NameTypeDescription
pose_imagesIMAGE