wan2-2-animate-14b

Wan2.2-Animate-14B

A character animation and replacement video model: give it one character image and a driving video, and it transfers full-body motion and facial expression onto your character in either animation or replacement mode.

Apache-2.0
Video-to-Video
Safetensors
Diffusers
English
by @AIOZAI
21
0

Last updated: a month ago


Generic badge Generic badge

Wan2.2-Animate-14B

Summary

Introduction

Wan2.2-Animate-14B is a unified model for character animation and replacement, built on the Wan2.2 video generation foundation. Given a single character image and a driving video, it transfers full-body motion and facial expression from the video onto the character, and can operate in two modes:

  • Animation mode: generates a video of the character image that mimics the human motion and expressions in the driving video.
  • Replacement mode: replaces a character in the source video with the provided character image, preserving the original motion, expression, and scene.

Because it reproduces body motion and facial expression together, the model suits tasks such as animating a still character, re-enacting a performance, or swapping the subject in existing footage.

Wan2.2-Animate builds on Wan2.2, which introduced the following into video diffusion models:

  • 👍 Effective MoE Architecture: Wan2.2 introduces a Mixture-of-Experts (MoE) architecture into video diffusion models. By separating the denoising process across timesteps with specialized expert models, this enlarges overall model capacity while maintaining the same computational cost.

  • 👍 Cinematic-level Aesthetics: Wan2.2 incorporates curated aesthetic data with detailed labels for lighting, composition, contrast, color tone, and more. This allows for more precise and controllable cinematic style generation, supporting videos with customizable aesthetic preferences.

  • 👍 Complex Motion Generation: Compared to Wan2.1, Wan2.2 is trained on significantly more data, with +65.6% more images and +83.2% more videos. This notably improves generalization across motion, semantics, and aesthetics; the Wan team reports leading performance among open- and closed-source models.

  • 👍 Efficient High-Definition Hybrid TI2V: Wan2.2 also open-sources a 5B model built with the Wan2.2-VAE, which achieves a compression ratio of 16×16×4. It supports both text-to-video and image-to-video generation at 720P with 24fps and can run on consumer-grade GPUs such as the 4090, ranking among the fastest 720P@24fps models available.

Model Architecture

Wan2.2 builds on the foundation of Wan2.1 with notable improvements in generation quality and model capability. This upgrade is driven by a series of key technical innovations, mainly including the Mixture-of-Experts (MoE) architecture, upgraded training data, and high-compression video generation.

Mixture-of-Experts (MoE) Architecture

Wan2.2 introduces Mixture-of-Experts (MoE) architecture into the video generation diffusion model. MoE has been widely validated in large language models as an efficient approach to increase total model parameters while keeping inference cost nearly unchanged. In Wan2.2, the A14B model series adopts a two-expert design tailored to the denoising process of diffusion models: a high-noise expert for the early stages, focusing on overall layout; and a low-noise expert for the later stages, refining video details. Each expert model has about 14B parameters, resulting in a total of 27B parameters but only 14B active parameters per step, keeping inference computation and GPU memory nearly unchanged.

The transition point between the two experts is determined by the signal-to-noise ratio (SNR), a metric that decreases monotonically as the denoising step tt increases. At the beginning of the denoising process, tt is large and the noise level is high, so the SNR is at its minimum, denoted as SNRmin{SNR}_{min}. In this stage, the high-noise expert is activated. The Wan team defines a threshold step tmoe{t}_{moe} corresponding to half of SNRmin{SNR}_{min}, switching to the low-noise expert when t<tmoet < {t}_{moe}.

To validate the effectiveness of the MoE architecture, four settings are compared based on their validation loss curves. The baseline Wan2.1 model does not employ the MoE architecture. Among the MoE-based variants, the Wan2.1 & High-Noise Expert reuses the Wan2.1 model as the low-noise expert while uses the Wan2.2's high-noise expert, while the Wan2.1 & Low-Noise Expert uses Wan2.1 as the high-noise expert and employ the Wan2.2's low-noise expert. The Wan2.2 (MoE) (the final version) achieves the lowest validation loss, indicating that its generated video distribution is closest to ground truth and exhibits better convergence.

Efficient High-Definition Hybrid TI2V

To enable more efficient deployment, Wan2.2 also explores a high-compression design. In addition to the 27B MoE models, a 5B dense model, i.e., TI2V-5B, is released. It is supported by a high-compression Wan2.2-VAE, which achieves a T×H×WT\times H\times W compression ratio of 4×16×164\times16\times16, increasing the overall compression rate to 64 while maintaining high-quality video reconstruction. With an additional patchification layer, the total compression ratio of TI2V-5B reaches 4×32×324\times32\times32. Without specific optimization, TI2V-5B can generate a 5-second 720P video in under 9 minutes on a single consumer-grade GPU, ranking among the fastest 720P@24fps video generation models. This model also natively supports both text-to-video and image-to-video tasks within a single unified framework, covering both academic research and practical applications.

Comparisons to Leading Models

The Wan team compared Wan2.2 with leading closed-source commercial models on its Wan-Bench 2.0, evaluating performance across several dimensions. The Wan team reports that Wan2.2 performs favorably against these models.

Parameters

Inputs

  • input_image - (image -.png|.jpg|.jpeg): A reference image used as the primary visual source. This may define the subject’s appearance, identity, or initial frame for generation.
  • pose_video - (video - .mp4): A video providing motion or pose guidance. The model uses this input to control the movement or body dynamics in the generated output.
  • face_video - (video - .mp4): A video containing facial expressions or identity cues. Used to guide facial animation, lip-sync, or expression transfer.
  • prompt - (text): A textual description specifying the desired scene, style, or behavior in the generated video.
  • segment_frame - (integer): The number of frames to process in each segment during generation. This helps manage memory usage and enables processing of longer videos.
  • prev_segment_frame - (integer): The number of frames from the previous segment to retain for temporal continuity between segments.
  • guidance_scale - (float): Controls how strongly the generation follows the given prompt. Higher values enforce closer adherence but may reduce variability.
  • num_steps - (integer): The number of inference steps used during generation. Higher values typically improve quality but increase processing time.
  • mode - (text): Specifies the generation mode or pipeline behavior (e.g., animation, replace).
  • background_video - (video - .mp4): An optional background video used to define the scene or environment where the generated subject will be placed.
  • mask_video - (video - .mp4): A video mask used to control which regions are modified or preserved during generation (e.g., foreground/background separation).

Output

  • output_video - (video -.mp4): The generated video that combines the provided inputs, including visual appearance, motion, facial expressions, and prompt guidance. The output reflects temporal consistency across frames and adheres to the specified generation parameters.

Usage for developers

Please find below the details to track the information and access the code for processing the model on our platform.

Requirements

pip install -r requirements.txt

Code based on AIOZ structure

import os
import torch
from diffusers import WanAnimatePipeline
from diffusers.utils import export_to_video, load_image, load_video

...

def do_ai_task(
        input_image: str,
        pose_video: str,
        face_video: str,
        prompt: str,
        segment_frame: int,
        prev_segment_frame: int,
        guidance_scale: float,
        num_steps: int,
        mode: str,
        background_video: Union[str, None],
        mask_video: Union[str, None],
        model_storage_directory: Union[str, Path],
        device: Literal["cpu", "cuda", "gpu"] = "cpu",
        *args, **kwargs) -> Any:
    """Define AI task: load model, pre-process, post-process, etc ..."""
    # Define AI task workflow. Below is an example

    if torch.cuda.is_available():
        device = "cuda"
        dtype = torch.float16
    else:
        device = "cpu"
        dtype = torch.float32

    model_weight_path = os.path.join(model_storage_directory, "model_weights.bin")
    pipe = WanAnimatePipeline.from_pretrained(model_weight_path, torch_dtype=dtype)
    pipe.to(device)

    ...

    export_to_video(_video, "output_video.mp4", fps=30)
    output_video = open("output_video.mp4", "rb")  # io.BufferedReader
    return  output_video

Reference

This repository is based on and inspired by the Wan team's work. We sincerely appreciate their generosity in sharing the model and code.

License

Wan2.2-Animate-14B is released by the Wan team (Alibaba) under the Apache License 2.0, which permits use, modification, and redistribution for both commercial and non-commercial purposes. AIOZ AI redistributes this model in accordance with those terms. A full copy of the license is included in the LICENSE file, and attribution is provided in the NOTICE file.

Citation

@article{wan2025,
      title={Wan: Open and Advanced Large-Scale Video Generative Models}, 
      author={Team Wan and Ang Wang and Baole Ai and Bin Wen and Chaojie Mao and Chen-Wei Xie and Di Chen and Feiwu Yu and Haiming Zhao and Jianxiao Yang and Jianyuan Zeng and Jiayu Wang and Jingfeng Zhang and Jingren Zhou and Jinkai Wang and Jixuan Chen and Kai Zhu and Kang Zhao and Keyu Yan and Lianghua Huang and Mengyang Feng and Ningyi Zhang and Pandeng Li and Pingyu Wu and Ruihang Chu and Ruili Feng and Shiwei Zhang and Siyang Sun and Tao Fang and Tianxing Wang and Tianyi Gui and Tingyu Weng and Tong Shen and Wei Lin and Wei Wang and Wei Wang and Wenmeng Zhou and Wente Wang and Wenting Shen and Wenyuan Yu and Xianzhong Shi and Xiaoming Huang and Xin Xu and Yan Kou and Yangyu Lv and Yifei Li and Yijing Liu and Yiming Wang and Yingya Zhang and Yitong Huang and Yong Li and You Wu and Yu Liu and Yulin Pan and Yun Zheng and Yuntao Hong and Yupeng Shi and Yutong Feng and Zeyinzi Jiang and Zhen Han and Zhi-Fan Wu and Ziyu Liu},
      journal = {arXiv preprint arXiv:2503.20314},
      year={2025}
}