{"id":49813815,"url":"https://github.com/theelderemo/wan2.2-google-colab","last_synced_at":"2026-05-13T03:04:50.315Z","repository":{"id":325413237,"uuid":"1101078690","full_name":"theelderemo/wan2.2-google-colab","owner":"theelderemo","description":"This allows you to utilize Google Colab (or other notebooks) to run wan2.2 image to video","archived":false,"fork":false,"pushed_at":"2026-03-26T07:41:02.000Z","size":70,"stargazers_count":22,"open_issues_count":1,"forks_count":9,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T02:32:09.564Z","etag":null,"topics":["ai-generated","ai-video","colab","google-colab","image-to-video","jupyter","jupyter-notebook","notebook","python","template","wan","wan-video","wan22"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theelderemo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-21T06:53:44.000Z","updated_at":"2026-03-26T11:05:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/theelderemo/wan2.2-google-colab","commit_stats":null,"previous_names":["theelderemo/wan2.2-google-colab"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theelderemo/wan2.2-google-colab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theelderemo%2Fwan2.2-google-colab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theelderemo%2Fwan2.2-google-colab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theelderemo%2Fwan2.2-google-colab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theelderemo%2Fwan2.2-google-colab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theelderemo","download_url":"https://codeload.github.com/theelderemo/wan2.2-google-colab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theelderemo%2Fwan2.2-google-colab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32965784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"online","status_checked_at":"2026-05-13T02:00:07.132Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-generated","ai-video","colab","google-colab","image-to-video","jupyter","jupyter-notebook","notebook","python","template","wan","wan-video","wan22"],"created_at":"2026-05-13T03:04:45.979Z","updated_at":"2026-05-13T03:04:50.307Z","avatar_url":"https://github.com/theelderemo.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wan2.2 Google Colab — Complete Video Generation Suite\n\nA comprehensive Google Colab notebook covering **every generation mode** in [Wan2.2](https://github.com/Wan-Video/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.\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/theelderemo/wan2.2-google-colab/blob/main/wan2_2.ipynb)\n\n---\n\n## Supported Generation Modes\n\n| Section | Mode | Model | Resolution | Notes |\n|---------|------|-------|------------|-------|\n| 2 | **Text-to-Video** | T2V-A14B | 480P / 720P | MoE 27B total / 14B active |\n| 3 | **Image-to-Video** | I2V-A14B | 480P / 720P | Aspect ratio follows input image |\n| 4 | **Text+Image-to-Video** | TI2V-5B | 720P @ 24fps | Runs on RTX 4090 (24 GB) |\n| 5a | **Speech-to-Video** | S2V-14B | 480P / 720P | Image + audio file → talking video |\n| 5b | **Pose-Driven Speech-to-Video** | S2V-14B | 480P / 720P | Image + audio + pose MP4 |\n| 5c | **TTS Speech-to-Video** | S2V-14B + CosyVoice | 480P / 720P | Synthesize voice, then animate |\n| 6a | **Character Animation** | Animate-14B | 720P | Character mimics motion from video |\n| 6b | **Character Replacement** | Animate-14B | 720P | Swap character into existing video |\n\n---\n\n## Quick Start\n\n### 1. Open in Google Colab\n\nClick the badge above or upload `wan2_2.ipynb` directly to [colab.research.google.com](https://colab.research.google.com).\n\n### 2. Select a GPU Runtime\n\nGo to `Runtime` → `Change runtime type` → select **A100** (recommended for A14B models) or **T4/L4** (for TI2V-5B).\n\n### 3. Run Section 0 — Setup\n\nRun the setup cells once per session. They:\n- Check your GPU\n- Clone the Wan2.2 repo (skips if already present)\n- Install all Python dependencies\n- Optionally install flash-attn and CosyVoice (S2V TTS) extras\n\n### 4. Run Section 1 — Download Your Model(s)\n\nEach model has its own download cell. Only download what you need:\n\n| Cell | Model | Approx Size |\n|------|-------|-------------|\n| 1.1 | Wan2.2-T2V-A14B | ~28 GB |\n| 1.2 | Wan2.2-I2V-A14B | ~28 GB |\n| 1.3 | Wan2.2-TI2V-5B | ~10 GB |\n| 1.4 | Wan2.2-S2V-14B | ~28 GB |\n| 1.5 | Wan2.2-Animate-14B | ~28 GB |\n\n### 5. Jump to Any Generation Section\n\nEach section is self-contained. Configure settings via the `@param` widgets, upload your inputs, and run the generation cell.\n\n---\n\n## Notebook Structure\n\n```\nwan2_2.ipynb\n├── Section 0 — Setup \u0026 Installation\n│   ├── 0.1  GPU check\n│   ├── 0.2  Clone Wan2.2 repo\n│   ├── 0.3  Install core dependencies\n│   ├── 0.4  Install flash-attn (optional)\n│   ├── 0.5  Install S2V / CosyVoice deps (optional)\n│   └── 0.6  Install huggingface-hub CLI\n│\n├── Section 1 — Model Download\n│   ├── 1.1  T2V-A14B\n│   ├── 1.2  I2V-A14B\n│   ├── 1.3  TI2V-5B\n│   ├── 1.4  S2V-14B\n│   └── 1.5  Animate-14B\n│\n├── Section 2 — Text-to-Video (T2V-A14B)\n│   ├── 2.1  Configuration (resolution, steps, seed, prompt extension)\n│   └── 2.2  Run generation\n│\n├── Section 3 — Image-to-Video (I2V-A14B)\n│   ├── 3.1  Upload image\n│   ├── 3.2  Configuration\n│   └── 3.3  Run generation\n│\n├── Section 4 — Text+Image-to-Video (TI2V-5B)\n│   ├── 4.1  Upload image (optional — omit for pure T2V)\n│   ├── 4.2  Configuration\n│   └── 4.3  Run generation\n│\n├── Section 5 — Speech-to-Video (S2V-14B)\n│   ├── 5.1  Upload image \u0026 audio\n│   ├── 5.2a Basic S2V config + run\n│   ├── 5.3b Pose-driven S2V (upload pose video) + run\n│   └── 5.4c TTS S2V — CosyVoice voice cloning + run\n│\n├── Section 6 — Character Animation \u0026 Replacement (Animate-14B)\n│   ├── 6.1  Upload character image \u0026 motion video\n│   ├── 6.2  Choose mode (animate / replace) \u0026 resolution\n│   ├── 6.3  Preprocess input video (extracts pose/face signals)\n│   ├── 6.4a Run — Animation mode\n│   └── 6.4b Run — Replacement mode\n│\n└── Section 7 — Display \u0026 Download\n    ├── 7.1  List all generated videos\n    ├── 7.2  Preview video inline\n    └── 7.3  Download to local machine\n```\n\n---\n\n## GPU Requirements\n\n| Model | Minimum VRAM | Recommended |\n|-------|-------------|-------------|\n| TI2V-5B | 24 GB | RTX 4090 / L4 |\n| T2V-A14B | 24 GB (with offload flags) | A100 80 GB |\n| I2V-A14B | 24 GB (with offload flags) | A100 80 GB |\n| S2V-14B | 80 GB | A100 80 GB |\n| Animate-14B | 80 GB | A100 80 GB |\n\n\u003e All A14B sections include `--offload_model`, `--convert_model_dtype`, and `--t5_cpu` toggle flags to reduce VRAM usage on smaller GPUs.\n\n---\n\n## Prompt Extension\n\nFor richer, more detailed outputs, the T2V and I2V sections support **prompt extension** via:\n\n- **Local Qwen** — runs a Qwen2.5 LLM (T2V) or Qwen2.5-VL (I2V) locally to expand your prompt. No API key needed.\n- **Dashscope API** — uses Alibaba Cloud's hosted `qwen-plus` / `qwen-vl-max` models. Requires a free [Dashscope API key](https://www.alibabacloud.com/help/en/model-studio/getting-started/first-api-call-to-qwen).\n\n---\n\n## Troubleshooting\n\n### Out of Memory (OOM)\n- Enable all three memory flags: `offload_model`, `convert_model_dtype`, `t5_cpu`\n- Drop resolution to 832×480\n- Use TI2V-5B (Section 4) instead of the A14B models — it runs on 24 GB\n\n### Model Download Fails\n- Re-run the download cell — `huggingface-cli` resumes partial downloads\n- Log in to Hugging Face to avoid rate limits: uncomment the `login()` line in cell 0.6\n\n### flash-attn Build Fails\n- Skip cell 0.4 — the model falls back to standard attention automatically\n- Or try: `pip install flash-attn --no-build-isolation` after installing all other deps first\n\n### S2V / CosyVoice Import Errors\n- Make sure you ran cell 0.5 before Section 5c\n- CosyVoice requires the `requirements_s2v.txt` extras\n\n### Animate Preprocessing Fails\n- Ensure `Wan2.2-Animate-14B/process_checkpoint` exists (downloaded in cell 1.5)\n- Input video should be a standard MP4 with a clearly visible human subject\n\n---\n\n## Repository Structure\n\n```\nwan2.2-google-colab/\n├── wan2_2.ipynb    # Main notebook (all generation modes)\n├── README.md       # This file\n└── SECURITY.md\n```\n\n---\n\n## Credits \u0026 Links\n\n- **Wan2.2 Model**: [Wan-Video/Wan2.2](https://github.com/Wan-Video/Wan2.2)\n- **Hugging Face**: [Wan-AI](https://huggingface.co/Wan-AI/)\n- **Paper**: [arXiv:2503.20314](https://arxiv.org/abs/2503.20314)\n- **CosyVoice (TTS)**: [FunAudioLLM/CosyVoice](https://github.com/FunAudioLLM/CosyVoice)\n\n## License\n\nThis template is released under the same [Apache 2.0 License](https://github.com/Wan-Video/Wan2.2/blob/main/LICENSE.txt) as the upstream Wan2.2 project.\n\n---\n\n\u003e This is an unofficial Colab template. For questions about the Wan2.2 model itself, refer to the [official repository](https://github.com/Wan-Video/Wan2.2) or join their [Discord](https://discord.gg/AKNgpMK4Yj).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheelderemo%2Fwan2.2-google-colab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheelderemo%2Fwan2.2-google-colab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheelderemo%2Fwan2.2-google-colab/lists"}