Installation

This page outlines a simple path to set up an environment suitable for experimenting with Wan 2.2 Animate concepts. Commands and steps are provided as general guidance and may need adaptation for your system.

Prerequisites

1. Create a Virtual Environment

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip

2. Install Dependencies

Install core packages for video processing and model execution. Adjust versions to match your CUDA setup.

pip install torch torchvision torchaudio
pip install opencv-python pillow numpy tqdm pyyaml

3. Prepare Assets

4. Configure Inference

Set basic parameters like input paths, output directory, frame size, and duration. Start with short clips and a moderate resolution.

CONFIG=
  input_image=assets/character/char.png   input_video=assets/reference/ref.mp4   output_dir=outputs/run_01   width=720 height=1280 fps=24   replace=false # set to true for replacement mode

5. Run a Test

Run a short test to validate motion following and identity stability.

python scripts/infer.py   --image assets/character/char.png   --video assets/reference/ref.mp4   --output outputs/run_01   --width 720 --height 1280 --fps 24   --replace false

6. Replacement Mode

For replacement, provide a mask or region hint. The relighting module should adapt tone for better scene fit.

python scripts/infer.py   --image assets/character/char.png   --video assets/reference/ref.mp4   --output outputs/run_02   --width 720 --height 1280 --fps 24   --replace true   --mask assets/reference/subject_mask.png

Tips

Note: This is a generic setup guide intended for education. Adapt steps to your environment.