Draw ViT Pose
Redraw WanAnimate pose skeletons without burning your VRAM
- pose_data
- pose_images
WanAnimate is driven by stick figures. The model takes a pose skeleton image plus a mask, and animates your character along that skeleton. Getting the skeleton is usually the expensive part - pose-extraction nodes load a hefty OpenPose/DWPose stack and chew through every frame. DrawViTPose_lhy is the cheap end of that pipeline: it draws the pose skeleton images from pose data you already have, using the Wan team's own visualization code, and it's built to use "less memory" - the description's exact words - because it draws with plain numpy instead of keeping an entire pose model resident.
It sits in the pack's lhyNodes/Wan category, in the middle of a WanAnimate workflow: something upstream extracts pose data (the pack's POSEDATA type), this node renders it to an image batch, and that batch feeds the animation stage alongside your reference image and mask.
How it works
The pose_data input is a POSEDATA object containing per-frame keypoint metadata (pose_metas) and, optionally, a retarget reference image. For each frame the node draws a black canvas, then plots the body, hand, and (optionally) head keypoints as sticks using the Alibaba Wan team's human_visualization drawing functions. Sticks are lines with configurable width; the -1 auto default picks a sensible width, 0 disables that limb group entirely.
retarget_padding is the interesting knob: when it's above 0 and a retarget image is present, the drawn pose gets padded and resized to fit the target dimensions - which is how you keep the skeleton's proportions aligned with the retarget reference rather than the raw source. The default 832×480 dimensions match typical Wan video aspect.
Inputs and outputs
pose_data(POSEDATA) - the pose metadata to draw.width/height(INT, default 832×480) - output canvas size.retarget_padding(INT, 0–512, default 16) - >0 pads/resizes the retargeted pose to target size.body_stick_width(INT, −1–20, default −1) - body stick width; 0 disables body drawing, −1 auto.hand_stick_width(INT, −1–20, default −1) - same for hands.draw_head(BOOLEAN, default true) - whether head keypoints get drawn.
One output: pose_images (IMAGE), one skeleton frame per pose frame, sized to width×height.
Installing it
Part of ComfyUI-lhyNodes:
- ComfyUI Manager → search
lhyNodes→ Install, restart. - Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/lihaoyun6/ComfyUI-lhyNodes.git
python -m pip install -r ComfyUI-lhyNodes/requirements.txt
Restart ComfyUI. Note the pack's requirements include ultralytics and opencv-python - the Wan/pose nodes are the reason they're there, and the module imports them at load, so a failed pip install here shows up as a pack-wide import error.
Where people get burned
This node draws skeletons; it does not extract them. Feed it raw video frames and there's nothing to draw - you need POSEDATA, which comes from a pose-extraction/retarget stage. Also, retarget_padding only does anything when the pose data actually carries a retarget_image; if yours doesn't, the node falls back to plain padding and the knob silently does nothing. Preview the pose_images output once before running the full animation - a skeleton that's scaled wrong will produce a character that jitters even though "everything ran fine."
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| pose_data | POSEDATA | — | |
| width | INT | 83264–2048 | Width of the generation |
| height | INT | 48064–2048 | Height of the generation |
| retarget_padding | INT | 160–512 | When > 0, the retargeted pose image is padded and resized to the target size |
| body_stick_width | INT | -1-1–20 | Width of the body sticks. Set to 0 to disable body drawing, -1 for auto |
| hand_stick_width | INT | -1-1–20 | Width of the hand sticks. Set to 0 to disable hand drawing, -1 for auto |
| draw_head | BOOLEAN | True | Whether to draw head keypoints |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pose_images | IMAGE | — |