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.


Model Download

Get the Wan-Animate model itself plus the models shared across the Wan 2.1 family.

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.

wan2_2_animate_animation.json
Deep diveAnimation Mode

Load Wan-Animate Model

  • Load Wan2_2-Animate with Load Diffusion Model.

Decide Generation Resolution

  • Adjust the total number of pixels with Scale Image to Total Pixels according 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_image The still image you want to animate.
  • face_video A video of the face cropped out of the reference video. Pose and Face Detection automatically runs YOLO face detection -> cropping.
  • pose_video A 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.
Outputs
reference_image
reference_image
pose_video(before processing)
output

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.

wan2_2_animate_replacement.json
Deep diveReplacement Mode

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 Detection to SAM2.1 to generate a mask.
  • Expand the mask a little, then turn it into a blocky, pixel-art-like mask with the Blockify node and use that as character_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 as background_video.
Outputs
background-pose_video
reference_image
reference_image
output

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)

wan2_2_animate_animation_lightx2v.json
Deep diveAnimation Mode (Fast Version)

Apply LoRA

  • 🟪 Load the Lightx2v LoRA with LoraLoaderModelOnly.

  • KSampler Settings

    • steps ... 4-6
    • cfg ... 1.0
Outputs
20steps
6steps

Replacement Mode (Fast Version)

wan2_2_animate_replacement_lightx2v.json

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)

wan2_2_animate_animation_lightx2v_repeat.json

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_video and pose_video from frame 78 onward.
    • Put the number of offset frames in video_frame_offset, and it automatically shifts where face_video / pose_video start being read.
  • continue_motion_max_frames

    • Sets how many frames overlap between runs.
    • For example, with length at 77 and continue_motion_max_frames at 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)

wan2_2_animate_replacement_lightx2v_repeat.json