theelderemo
wan2.2-google-colab
Jupyter Notebook

This allows you to utilize Google Colab (or other notebooks) to run wan2.2 image to video

Last updated Jun 28, 2026
42
Stars
15
Forks
1
Issues
+1
Stars/day
Attention Score
65
Language breakdown
No language data available.
โ–ธ Files click to expand
README

Wan2.2 Google Colab โ€” Complete Video Generation Suite

A comprehensive Google Colab notebook covering every generation mode in Wan2.2 โ€” the open-source MoE video generation model from Alibaba. Includes text-to-video, image-to-video, speech-to-video, pose-driven animation, character replacement, and more.

Open In Colab


Supported Generation Modes

| Section | Mode | Model | Resolution | Notes | |---------|------|-------|------------|-------| | 2 | Text-to-Video | T2V-A14B | 480P / 720P | MoE 27B total / 14B active | | 3 | Image-to-Video | I2V-A14B | 480P / 720P | Aspect ratio follows input image | | 4 | Text+Image-to-Video | TI2V-5B | 720P @ 24fps | Runs on RTX 4090 (24 GB) | | 5a | Speech-to-Video | S2V-14B | 480P / 720P | Image + audio file โ†’ talking video | | 5b | Pose-Driven Speech-to-Video | S2V-14B | 480P / 720P | Image + audio + pose MP4 | | 5c | TTS Speech-to-Video | S2V-14B + CosyVoice | 480P / 720P | Synthesize voice, then animate | | 6a | Character Animation | Animate-14B | 720P | Character mimics motion from video | | 6b | Character Replacement | Animate-14B | 720P | Swap character into existing video |


Quick Start

1. Open in Google Colab

Click the badge above or upload wan22.ipynb directly to colab.research.google.com.

2. Select a GPU Runtime

Go to Runtime โ†’ Change runtime type โ†’ select A100 (recommended for A14B models) or T4/L4 (for TI2V-5B).

3. Run Section 0 โ€” Setup

Run the setup cells once per session. They:

  • Check your GPU
  • Clone the Wan2.2 repo (skips if already present)
  • Install all Python dependencies
  • Optionally install flash-attn and CosyVoice (S2V TTS) extras

4. Run Section 1 โ€” Download Your Model(s)

Each model has its own download cell. Only download what you need:

| Cell | Model | Approx Size | |------|-------|-------------| | 1.1 | Wan2.2-T2V-A14B | ~28 GB | | 1.2 | Wan2.2-I2V-A14B | ~28 GB | | 1.3 | Wan2.2-TI2V-5B | ~10 GB | | 1.4 | Wan2.2-S2V-14B | ~28 GB | | 1.5 | Wan2.2-Animate-14B | ~28 GB |

5. Jump to Any Generation Section

Each section is self-contained. Configure settings via the @param widgets, upload your inputs, and run the generation cell.


Notebook Structure

wan2_2.ipynb
โ”œโ”€โ”€ Section 0 โ€” Setup & Installation
โ”‚   โ”œโ”€โ”€ 0.1  GPU check
โ”‚   โ”œโ”€โ”€ 0.2  Clone Wan2.2 repo
โ”‚   โ”œโ”€โ”€ 0.3  Install core dependencies
โ”‚   โ”œโ”€โ”€ 0.4  Install flash-attn (optional)
โ”‚   โ”œโ”€โ”€ 0.5  Install S2V / CosyVoice deps (optional)
โ”‚   โ””โ”€โ”€ 0.6  Install huggingface-hub CLI
โ”‚
โ”œโ”€โ”€ Section 1 โ€” Model Download
โ”‚   โ”œโ”€โ”€ 1.1  T2V-A14B
โ”‚   โ”œโ”€โ”€ 1.2  I2V-A14B
โ”‚   โ”œโ”€โ”€ 1.3  TI2V-5B
โ”‚   โ”œโ”€โ”€ 1.4  S2V-14B
โ”‚   โ””โ”€โ”€ 1.5  Animate-14B
โ”‚
โ”œโ”€โ”€ Section 2 โ€” Text-to-Video (T2V-A14B)
โ”‚   โ”œโ”€โ”€ 2.1  Configuration (resolution, steps, seed, prompt extension)
โ”‚   โ””โ”€โ”€ 2.2  Run generation
โ”‚
โ”œโ”€โ”€ Section 3 โ€” Image-to-Video (I2V-A14B)
โ”‚   โ”œโ”€โ”€ 3.1  Upload image
โ”‚   โ”œโ”€โ”€ 3.2  Configuration
โ”‚   โ””โ”€โ”€ 3.3  Run generation
โ”‚
โ”œโ”€โ”€ Section 4 โ€” Text+Image-to-Video (TI2V-5B)
โ”‚   โ”œโ”€โ”€ 4.1  Upload image (optional โ€” omit for pure T2V)
โ”‚   โ”œโ”€โ”€ 4.2  Configuration
โ”‚   โ””โ”€โ”€ 4.3  Run generation
โ”‚
โ”œโ”€โ”€ Section 5 โ€” Speech-to-Video (S2V-14B)
โ”‚   โ”œโ”€โ”€ 5.1  Upload image & audio
โ”‚   โ”œโ”€โ”€ 5.2a Basic S2V config + run
โ”‚   โ”œโ”€โ”€ 5.3b Pose-driven S2V (upload pose video) + run
โ”‚   โ””โ”€โ”€ 5.4c TTS S2V โ€” CosyVoice voice cloning + run
โ”‚
โ”œโ”€โ”€ Section 6 โ€” Character Animation & Replacement (Animate-14B)
โ”‚   โ”œโ”€โ”€ 6.1  Upload character image & motion video
โ”‚   โ”œโ”€โ”€ 6.2  Choose mode (animate / replace) & resolution
โ”‚   โ”œโ”€โ”€ 6.3  Preprocess input video (extracts pose/face signals)
โ”‚   โ”œโ”€โ”€ 6.4a Run โ€” Animation mode
โ”‚   โ””โ”€โ”€ 6.4b Run โ€” Replacement mode
โ”‚
โ””โ”€โ”€ Section 7 โ€” Display & Download
    โ”œโ”€โ”€ 7.1  List all generated videos
    โ”œโ”€โ”€ 7.2  Preview video inline
    โ””โ”€โ”€ 7.3  Download to local machine

GPU Requirements

| Model | Minimum VRAM | Recommended | |-------|-------------|-------------| | TI2V-5B | 24 GB | RTX 4090 / L4 | | T2V-A14B | 24 GB (with offload flags) | A100 80 GB | | I2V-A14B | 24 GB (with offload flags) | A100 80 GB | | S2V-14B | 80 GB | A100 80 GB | | Animate-14B | 80 GB | A100 80 GB |

All A14B sections include --offloadmodel, --convertmodeldtype, and --t5cpu toggle flags to reduce VRAM usage on smaller GPUs.

Prompt Extension

For richer, more detailed outputs, the T2V and I2V sections support prompt extension via:

  • Local Qwen โ€” runs a Qwen2.5 LLM (T2V) or Qwen2.5-VL (I2V) locally to expand your prompt. No API key needed.
  • Dashscope API โ€” uses Alibaba Cloud's hosted qwen-plus / qwen-vl-max models. Requires a free Dashscope API key.

Troubleshooting

Out of Memory (OOM)

  • Enable all three memory flags: offloadmodel, convertmodeldtype, t5cpu
  • Drop resolution to 832ร—480
  • Use TI2V-5B (Section 4) instead of the A14B models โ€” it runs on 24 GB

Model Download Fails

  • Re-run the download cell โ€” huggingface-cli resumes partial downloads
  • Log in to Hugging Face to avoid rate limits: uncomment the login() line in cell 0.6

flash-attn Build Fails

  • Skip cell 0.4 โ€” the model falls back to standard attention automatically
  • Or try: pip install flash-attn --no-build-isolation after installing all other deps first

S2V / CosyVoice Import Errors

  • Make sure you ran cell 0.5 before Section 5c
  • CosyVoice requires the requirements_s2v.txt extras

Animate Preprocessing Fails

  • Ensure Wan2.2-Animate-14B/process_checkpoint exists (downloaded in cell 1.5)
  • Input video should be a standard MP4 with a clearly visible human subject

Repository Structure

wan2.2-google-colab/
โ”œโ”€โ”€ wan2_2.ipynb    # Main notebook (all generation modes)
โ”œโ”€โ”€ README.md       # This file
โ””โ”€โ”€ SECURITY.md

Credits & Links

License

This template is released under the same Apache 2.0 License as the upstream Wan2.2 project.


This is an unofficial Colab template. For questions about the Wan2.2 model itself, refer to the official repository or join their Discord.
๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท theelderemo/wan2.2-google-colab ยท Updated daily from GitHub