What is Wan-Animate?
Wan-Animate is a Wan 2.1-14B-I2V based model specialized for motion transfer to humans and characters.
- Animation Mode: Animates the input image to follow the movement of the person in the reference video.
- Replacement Mode: Replaces the person in the input video with the person in the reference image.
There are these two generation modes. I think it's easiest to think of Replacement Mode as Animation Mode plus "some extra processing to blend into the background".
Because it's based on Wan 2.1, it can only generate up to 77 frames. But just like Extension in Wan 2.1 VACE, you can repeatedly take the last few frames and generate what comes next, which effectively lets you handle long videos.
Required Custom Nodes
Face detection and pose estimation are done as preprocessing. These custom nodes make that much easier.
- ComfyUI-WanAnimatePreprocess
- Face detection by YOLO
- Pose (stick figure) extraction by ViTPose
- ComfyUI-segment-anything-2
- Person mask generation using SAM2 (Used in Replacement Mode)
Model Download
Get the Wan-Animate model itself plus the models shared across the Wan 2.1 family.
- diffusion_models
- loras
- clip_vision
- text_encoders
- vae
- gguf (Optional)
Placement example:
📂ComfyUI/
└── 📂models/
├── 📂clip_vision/
│ └── clip_vision_h.safetensors
├── 📂diffusion_models/
│ └── Wan2_2-Animate-14B_fp8_e4m3fn_scaled_KJ.safetensors
├── 📂loras/
│ └── WanAnimate_relight_lora_fp16.safetensors
├── 📂text_encoders/
│ └── umt5_xxl_fp8_e4m3fn_scaled.safetensors
├── 📂unet/
│ └── Wan2.2-Animate-14B-XXXX.gguf ← Only when using gguf
└── 📂vae/
└── wan_2.1_vae.safetensors
Animation Mode
This mode moves the input still image according to the movement of the person in the reference video.
It's pretty huge, which can make you nervous, but underneath it's exactly the same shape as Wan 2.1 image2video. Don't be scared off; let's keep going.


Load Wan-Animate Model
- Load
Wan2_2-AnimatewithLoad Diffusion Model.

Decide Generation Resolution
- Adjust the total number of pixels with
Scale Image to Total Pixelsaccording to the input image. - Change the value according to your PC specs.
- Finally, crop the resolution to a multiple of 16.

Feed extra inputs into the WanAnimateToVideo node
reference_imageThe still image you want to animate.face_videoA video of the face cropped out of the reference video.Pose and Face Detectionautomatically runs YOLO face detection -> cropping.pose_videoA stick-figure (keypoint) video made from the reference video with ViTPose. The driving video and the image you want to animate differ in body proportions and position, so a retarget step adjusts for that.

Replacement Mode
This mode replaces the person in the input video with the person in the reference image.
It's Animation Mode plus a mask for inpainting the person and a relighting step to blend them into the background.


Add Relight LoRA
- Add a relight LoRA to blend the swapped-in person into the background.

Padding of Reference Image
- This time the video is the base, so pad the reference image to match the video's resolution.

Person Mask Generation
- Pass the person coordinates acquired by
Pose and Face Detectionto SAM2.1 to generate a mask. - Expand the mask a little, then turn it into a blocky, pixel-art-like mask with the
Blockifynode and use that ascharacter_mask. If you don't do this, for some reason a thin edge remains on the outline of the generated video. - Fill the masked area with black using
ImageCompositeMasked, and use that video asbackground_video.

6-Step Inference (Lightx2v LoRA)
With a distilled LoRA, you can cut sampling down to 4-6 steps.
With text2video the quality loss bothered me, but Wan-Animate isn't making a video from scratch, so it's barely noticeable. This one is worth using whenever you can.
Model Download
📂ComfyUI/
└── 📂models/
└── 📂loras/
└── Wan21_I2V_14B_lightx2v_cfg_step_distill_lora_rank64.safetensors
Animation Mode (Fast Version)


Apply LoRA
-
🟪 Load the Lightx2v LoRA with
LoraLoaderModelOnly. -
KSampler Settings
steps... 4-6cfg... 1.0
Replacement Mode (Fast Version)

Repeating Process for Long Videos
Like Wan 2.1 I2V, which it's based on, Wan-Animate can generate at most 77 frames in one run. To make anything longer, set it up to "generate over and over, carrying over the last few frames each time".
ComfyUI can't do loops, so you end up chaining nearly identical copies of the workflow one after another.
Honestly, this isn't an elegant setup, and it's one place where Kijai's implementation in ComfyUI-WanVideoWrapper does better.
Animation Mode (Repeat)

At first glance it looks like a massive workflow, but there are only two differences from the earlier ones.

-
video_frame_offset- If the first run generated 77 frames, the second run needs to use
face_videoandpose_videofrom frame 78 onward. - Put the number of offset frames in
video_frame_offset, and it automatically shifts whereface_video/pose_videostart being read.
- If the first run generated 77 frames, the second run needs to use
-
continue_motion_max_frames- Sets how many frames overlap between runs.
- For example, with
lengthat 77 andcontinue_motion_max_framesat 5, it uses the last 5 frames of the previous run and generates the remaining 72 frames fresh.
Keep chaining this group and, in theory, you can make a video as long as you like. Just like a photocopier, though, small errors build up a little at a time.
Replacement Mode (Repeat)

