WanAnimate Pose Reformer
Fix the Black Frames Killing Your Wan Animate Motion Transfer
- images
- images
Wan Animate is how you take a driving video's motion and transfer it onto your own character - think skeleton/pose control as the steering wheel for a Wan pipeline. But the pose detector that turns video frames into those skeleton images is not reliable frame to frame. Miss a face, lose a person mid-scene, or hit a hard cut, and you get a fully black pose frame. Feed that into the animation pass and the character flickers, freezes, or just breaks for those frames. Pose Reformer (class PoseReformer) is the cleanup node for exactly that: it detects the all-black frames in a pose sequence and replaces each one with the previous valid pose.
The mechanic, straight from the source, is almost embarrassingly simple - and that's why it's good. The node walks the input images frame by frame. If a frame isn't all-black (or it's the very first frame), it's kept as-is and remembered. If a frame is all-black, it's swapped for the last non-black frame it saw. Output: a repaired images sequence where every blank pose frame is now a copy of the last detected pose.
Why does that work for Wan Animate? Because a pose sequence is near-continuous: if the detector lost the person for two frames in the middle of a motion, the surrounding poses are basically the same pose, and holding the last good one beats showing nothing. The animation model gets a continuous pose stream instead of a hole, and the character stops glitching. It's a "hold the previous value" fix, and for this failure mode that's the right tool.
The inputs that matter
images- the pose frame sequence (an IMAGE tensor, i.e. a batch of frames), usually straight out of your pose-detection/ViTPose step.enabled(boolean, default true) - the kill switch. Turn it off and the node is a pure pass-through of the input sequence, which is handy for A/B testing whether the reformer is actually helping or when you're mid-debug.
Output: images, the repaired sequence, ready to feed the Wan Animate conditioning.
Where it sits in the pipeline
This is a sibling to the pack's WanAnimate Face Reformer (which does the same idea for facial-frame sequences) and sits alongside the WanAnimate Mask Preprocessor. In a typical Wan Animate graph you'd have: pose detection → Pose Reformer → animation conditioning → sampler. It's also not Wan-specific despite the name - the description notes it removes all-black frames from any frame sequence, so if you have a different video pipeline with intermittent blank frames, it'll hold the line there too.
Common issues
The obvious trap: if your first frame is black, there's nothing to hold onto, and the node has to keep it (it can't invent a pose out of nothing). So make sure your sequence doesn't start blank. Also - and this trips people - this node only replaces all-black frames. A frame that's black-ish but has a tiny bit of noise won't be caught, because the check is whether the max pixel value is zero. If your detector emits gray garbage rather than pure black, this won't catch it; clean up the detector side first.
Installing it
Part of lhaoyun6/ComfyUI-lhyNodes. Install via ComfyUI Manager by searching for lhyNodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/lihaoyun6/ComfyUI-lhyNodes.git
python -m pip install -r ComfyUI-lhyNodes/requirements.txt
Restart ComfyUI. The pack's shared requirements are ultralytics, opencv-python, numpy, and yarl; this node needs none of the heavy ones and downloads no models - the Wan Animate models themselves come from the ComfyUI Wan/Animate ecosystem you're already using.
If you've ever stared at a Wan Animate render where the character flickers out mid-motion, this is the two-node drop-in that fixes it. It's not glamorous, it's not deep learning - it's a well-aimed if black: reuse last, and for pose sequences that's exactly what the doctor ordered.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| enabled | BOOLEAN | true | Whether to process the image sequence. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |