A ready to use Google Colab notebook template for running Wan 2.2, an advanced image to video AI model. This template simplifies the setup process and provides an optimized workflow for generating videos from images on Colab's free GPU resources.
- One Click Setup: Automated installation of all dependencies and model downloads
- Optimized for Colab: Pre-configured settings for Google Colab (also works on other notebook platforms)
- Memory Efficient: Includes flags for model offloading and CPU-based text encoding to manage VRAM
- User Friendly Interface: Simple upload → configure → generate workflow
- Multiple Resolutions: Support for 1280×720, 832×480, and 1024×1024 outputs
-
Open in Google Colab:
- Upload
wan2_2.ipynbto Google Colab, or - Use the "Open in Colab" button if you've set one up
- Upload
-
Select GPU Runtime:
- Go to
Runtime→Change runtime type - Select
GPU(preferably A100 if available) - Click
Save
- Go to
-
Run the Cells:
- Execute each cell in order (or use
Runtime→Run all) - The notebook will:
- Clone the Wan 2.2 repository
- Install all required dependencies
- Download the model (≈60GB, takes 5ish minutes)
- Set up the generation pipeline
- Execute each cell in order (or use
-
Generate Your Video:
- Upload an input image when prompted
- Configure your prompt and settings
- Run the generation cell and wait for your video!
If you prefer working with Python scripts directly:
# The wan2_2.py file contains the same workflow
# You can run it in any Python notebook environment- GPU: NVIDIA A100 (40GB) or T4 (16GB)
- RAM: 12GB+ system RAM
- Storage: 70GB+ free space for model and temporary files
All dependencies are automatically installed by the notebook:
- Python 3.8+
- PyTorch 2.4.0+
- Transformers, Diffusers, Accelerate
- Flash Attention
- Various CV and ML libraries
The notebook will prompt you to upload an input image. Supported formats:
- JPEG/JPG
- PNG
- BMP
Write a detailed text description of the motion/action you want to see in your video:
Example: "A woman smiling and waving at the camera,
her hair gently moving in the breeze"
- Task: Choose between
i2v-A14B(14B parameters, higher quality) ori2v-1.3B(faster) - Resolution: Select from
1280*720,832*480, or1024*1024 - Checkpoint Directory: Default is
./Wan2.2-I2V-A14B
Enable these to manage memory usage:
- Offload Model: Offloads parts of the model to CPU to save VRAM
- Use T5 CPU: Runs text encoder on CPU (recommended for free tier)
- Convert Model Dtype: Converts model to lower precision for memory efficiency
Run the generation cell and wait. Processing typically takes:
- A100 GPU: 5-10 minutes per video
- T4 GPU: 15-25 minutes per video
The notebook automatically displays the generated video inline when complete.
wan2.2-google-colab/
├── wan2_2.ipynb # Main Colab notebook
├── wan2_2.py # Python script version
└── README.md # This file
To use a different Wan 2.2 checkpoint:
- Update the
checkpoint_dirvariable in Step 2 - Use the appropriate task identifier (
i2v-A14Bori2v-1.3B)
You can modify the generation command in Step 3 to add more flags. Refer to the official Wan 2.2 repository for all available options.
If you encounter CUDA out of memory errors:
- Enable all optimization flags (offload, T5 CPU, convert dtype)
- Try a lower resolution (832×480 instead of 1280×720)
- Use the smaller 1.3B model instead of 14B
- Restart runtime and clear cache before running
- Check your internet connection
- The model is ≈60GB, ensure enough storage
- Try rerunning the download cell
- Use more detailed prompts
- Ensure input image is high quality
- Try the larger A14B model if using 1.3B
- Experiment with different resolutions
- Wan 2.2 Model: Wan-Video/Wan2.2
This template follows the same license as the Wan 2.2 project. Please refer to the original repository for licensing information.
Contributions are welcome! If you have improvements or fixes:
- Fork this repository
- Make your changes
- Submit a pull request
For issues specific to this template, please open an issue in this repository.
For questions about the Wan 2.2 model itself, refer to the official repository.
Note: This is an unofficial template designed to make Wan 2.2 more accessible on Google Colab and other notebook platforms. Always ensure you have appropriate compute resources and comply with the platform's usage policies.