{
  "hf_id": "Wan-AI/Wan2.2-T2V-A14B-Diffusers",
  "meta": {
    "title": "Wan2.2",
    "slug": "wan2.2",
    "provider": "Wan (Alibaba)",
    "description": "Wan2.2 video generation models — T2V/I2V MoE (14B active) and unified TI2V (5B dense), served via vLLM-Omni",
    "date_added": "2025-12-31",
    "date_updated": "2026-04-27",
    "tasks": [
      "omni"
    ],
    "related_recipes": []
  },
  "model": {
    "model_id": "Wan-AI/Wan2.2-T2V-A14B-Diffusers",
    "min_vllm_version": "0.12.0",
    "architecture": "moe",
    "parameter_count": "28B",
    "active_parameters": "14B",
    "context_length": 0,
    "base_args": [],
    "base_env": {},
    "install": {
      "pip": {
        "command": "uv venv\nsource .venv/bin/activate\nuv pip install -U vllm --torch-backend auto"
      },
      "docker": {
        "command": "docker pull vllm/vllm-openai:latest"
      },
      "extras": [
        {
          "note": "Pin vllm==0.12.0 for Wan2.2",
          "command": "uv pip install vllm==0.12.0"
        },
        {
          "note": "vllm-omni pinned to a specific commit that includes Wan2.2 text-to-video support",
          "command": "uv pip install git+https://github.com/vllm-project/vllm-omni.git@ef01223c42be10ee260b9f6e5ec31894cd09d86e"
        }
      ]
    }
  },
  "omni": {
    "tasks": [
      {
        "id": "t2v",
        "vram_minimum_gb": 152,
        "description": "T2V MoE — 14B active parameters"
      },
      {
        "id": "i2v",
        "model_id": "Wan-AI/Wan2.2-I2V-A14B-Diffusers",
        "vram_minimum_gb": 40,
        "description": "I2V MoE — 14B active parameters"
      },
      {
        "id": "ti2v",
        "model_id": "Wan-AI/Wan2.2-TI2V-5B-Diffusers",
        "vram_minimum_gb": 20,
        "description": "Unified Text+Image-to-Video — dense 5B"
      }
    ]
  },
  "features": {},
  "opt_in_features": [],
  "variants": {
    "default": {
      "precision": "bf16",
      "vram_minimum_gb": 152,
      "description": "BF16 — variants moved to omni.tasks (T2V / I2V / TI2V each pick a different checkpoint)"
    }
  },
  "hardware_overrides": {
    "amd": {
      "extra_env": {
        "VLLM_ROCM_USE_AITER": "1",
        "SAFETENSORS_FAST_GPU": "1"
      }
    }
  },
  "guide": "## Overview\n\nWan2.2 is a video generation family served via **vLLM-Omni** with optional **Cache-DiT**\nacceleration:\n\n- `Wan-AI/Wan2.2-T2V-A14B-Diffusers` — Text-to-Video (MoE, 14B active)\n- `Wan-AI/Wan2.2-I2V-A14B-Diffusers` — Image-to-Video (MoE, 14B active)\n- `Wan-AI/Wan2.2-TI2V-5B-Diffusers` — Unified Text+Image-to-Video (dense 5B)\n\n## Prerequisites\n\n- vLLM-Omni on top of vLLM 0.12.0\n- diffusers (bundled in vLLM-Omni CLI scripts)\n\n## Installation\n\n```bash\nuv venv\nsource .venv/bin/activate\nuv pip install vllm==0.12.0\nuv pip install git+https://github.com/vllm-project/vllm-omni.git@ef01223c42be10ee260b9f6e5ec31894cd09d86e\n```\n\n### AMD ROCm (MI300X/MI325X/MI355X)\n\n```bash\nuv venv\nsource .venv/bin/activate\nuv pip install vllm==0.12.0 --extra-index-url https://wheels.vllm.ai/rocm/\nuv pip install git+https://github.com/vllm-project/vllm-omni.git@ef01223c42be10ee260b9f6e5ec31894cd09d86e\n```\n\n> ⚠️ The vLLM ROCm wheel requires Python 3.12, ROCm 7.0, and glibc >= 2.35.\n\n## Text-to-Video (T2V)\n\n```python\nfrom vllm_omni.entrypoints.omni import Omni\n\nomni = Omni(model=\"Wan-AI/Wan2.2-T2V-A14B-Diffusers\")\nframes = omni.generate(\n    \"Two anthropomorphic cats in comfy boxing gear fight on a spotlighted stage.\",\n    height=720, width=1280,\n    num_frames=81,\n    num_inference_steps=40,\n    guidance_scale=4.0,\n)\n```\n\nCLI:\n\n```bash\npython examples/offline_inference/text_to_video/text_to_video.py \\\n  --model Wan-AI/Wan2.2-T2V-A14B-Diffusers \\\n  --prompt \"A serene lakeside sunrise with mist over the water.\" \\\n  --height 720 --width 1280 \\\n  --num_frames 81 --num_inference_steps 40 \\\n  --guidance_scale 4.0 --fps 24 \\\n  --output t2v_output.mp4\n```\n\n### Running T2V on MI300X/MI325X/MI355X GPUs\n\n```bash\nVLLM_ROCM_USE_AITER=1 \\\nSAFETENSORS_FAST_GPU=1 \\\npython examples/offline_inference/text_to_video/text_to_video.py \\\n  --model Wan-AI/Wan2.2-T2V-A14B-Diffusers \\\n  --prompt \"A serene lakeside sunrise with mist over the water.\" \\\n  --height 720 --width 1280 \\\n  --num_frames 81 --num_inference_steps 40 \\\n  --guidance_scale 4.0 --fps 24 \\\n  --output t2v_output.mp4\n```\n\n## Image-to-Video (I2V)\n\n```python\nimport PIL.Image\nfrom vllm_omni.entrypoints.omni import Omni\n\nomni = Omni(model=\"Wan-AI/Wan2.2-I2V-A14B-Diffusers\")\nimage = PIL.Image.open(\"input.jpg\").convert(\"RGB\")\n\nframes = omni.generate(\n    \"A cat playing with yarn\",\n    pil_image=image,\n    height=480, width=832,\n    num_frames=81,\n    num_inference_steps=50,\n    guidance_scale=5.0,\n)\n```\n\n### Running I2V on MI300X/MI325X/MI355X GPUs\n\n```bash\nVLLM_ROCM_USE_AITER=1 \\\nSAFETENSORS_FAST_GPU=1 \\\npython examples/offline_inference/image_to_video/image_to_video.py \\\n  --model Wan-AI/Wan2.2-I2V-A14B-Diffusers \\\n  --image input.jpg --prompt \"A cat playing with yarn\" \\\n  --num_frames 81 --num_inference_steps 50 \\\n  --guidance_scale 5.0 --fps 16 --output i2v_output.mp4\n```\n\nTI2V CLI:\n\n```bash\npython examples/offline_inference/image_to_video/image_to_video.py \\\n  --model Wan-AI/Wan2.2-TI2V-5B-Diffusers \\\n  --image input.jpg --prompt \"A cat playing with yarn\" \\\n  --num_frames 81 --num_inference_steps 50 \\\n  --guidance_scale 5.0 --fps 16 --output ti2v_output.mp4\n```\n\n### Running TI2V on MI300X/MI325X/MI355X GPUs\n\n```bash\nVLLM_ROCM_USE_AITER=1 \\\nSAFETENSORS_FAST_GPU=1 \\\npython examples/offline_inference/image_to_video/image_to_video.py \\\n  --model Wan-AI/Wan2.2-TI2V-5B-Diffusers \\\n  --image input.jpg --prompt \"A cat playing with yarn\" \\\n  --num_frames 81 --num_inference_steps 50 \\\n  --guidance_scale 5.0 --fps 16 --output ti2v_output.mp4\n```\n\n## Cache-DiT Acceleration\n\n```python\nomni = Omni(\n    model=\"Wan-AI/Wan2.2-T2V-A14B-Diffusers\",\n    cache_backend=\"cache_dit\",\n    cache_config={\n        \"Fn_compute_blocks\": 8,\n        \"Bn_compute_blocks\": 0,\n        \"max_warmup_steps\": 4,\n        \"residual_diff_threshold\": 0.12,\n    },\n)\n```\n\n## Key Parameters\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `height` | 720 (T2V) / auto (I2V) | Video height (multiples of 16) |\n| `width` | 1280 (T2V) / auto (I2V) | Video width (multiples of 16) |\n| `num_frames` | 81 | Frames to generate |\n| `num_inference_steps` | 40–50 | Denoising steps |\n| `guidance_scale` | 4.0–5.0 | Classifier-free guidance scale |\n| `boundary_ratio` | 0.875 | MoE boundary split ratio |\n| `flow_shift` | 5.0 (720p) / 12.0 (480p) | Scheduler flow shift |\n\n## References\n\n- [Wan2.2-T2V-A14B](https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers)\n- [Wan2.2-I2V-A14B](https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers)\n- [Wan2.2-TI2V-5B](https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers)\n- [Cache-DiT Acceleration](https://github.com/vipshop/cache-dit)\n",
  "source": {
    "source": "vllm-omni",
    "repo": "vllm-project/vllm-omni",
    "ref": "main",
    "sha": "cda4a1ef83b295ba332146a7709e6277725edc9f",
    "path": "recipes/models/Wan-AI/Wan2.2-T2V-A14B-Diffusers.yaml",
    "edit_url": "https://github.com/vllm-project/vllm-omni/edit/main/recipes/models/Wan-AI/Wan2.2-T2V-A14B-Diffusers.yaml",
    "overlays": []
  }
}