--- license: apache-2.0 base_model: - Wan-AI/Wan2.2-TI2V-5B tags: - mlx - apple-silicon - video-generation - image-to-video - text-to-video - wan2.2 - quantized library_name: mlx-video pipeline_tag: image-to-video --- # Wan2.2-TI2V-5B — MLX 8-bit (q8) MLX-format, **8-bit quantized** conversion of [Wan-AI/Wan2.2-TI2V-5B](https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B) for native inference on Apple Silicon via [mlx-video](https://github.com/Blaizzy/mlx-video). TI2V-5B is the single-model (5B) Text+Image-to-Video variant of Wan2.2, using the Wan2.2 VAE (`z_dim=48`). It runs comfortably at **720p (1280×704), 24fps** on a 64 GB Apple Silicon machine, where the heavier 14B dual-model (I2V-A14B) struggles. ## Contents | File | Size | Notes | |------|------|-------| | `model.safetensors` | ~5 GB | Transformer (8-bit, group_size=64) | | `t5_encoder.safetensors` | ~11 GB | UMT5-XXL text encoder (bf16) | | `vae.safetensors` | ~2.6 GB | Wan2.2 VAE (z_dim=48, fp32) | | `config.json` | — | Includes quantization metadata | Total ≈ 18 GB. ## Quantization - **8-bit, group_size=64**, applied to transformer Linear layers (self/cross-attention Q/K/V/O + FFN). Embeddings, norms, and the output head remain bf16. - Converted with `mlx_video.models.wan_2.convert --quantize --bits 8 --group-size 64`. ## Usage (mlx-video) ```bash pip install git+https://github.com/Blaizzy/mlx-video.git # or: uv pip install git+https://github.com/Blaizzy/mlx-video.git huggingface-cli download --local-dir ./Wan2.2-TI2V-5B-MLX-Q8 python -m mlx_video.models.wan_2.generate \ --model-dir ./Wan2.2-TI2V-5B-MLX-Q8 \ --image ./start.png \ --prompt "the subject waves hello, warm sunlight, film grain" \ --width 1280 --height 704 --num-frames 81 \ --steps 40 --guide-scale 5.0 \ --output-path out.mp4 ``` - Resolution must be divisible by **32**. Frame count must be `4n+1`. Output is **24 fps**. - `--image` is optional (TI2V also does pure text-to-video). ## Hardware Validated on an Apple Silicon Mac (64 GB unified memory): 720p × 41 frames × 20 steps ≈ 15 min, stable memory. 32 GB+ recommended. ## License & Attribution This is a derivative of **Wan-AI/Wan2.2-TI2V-5B**, released under **Apache-2.0**. The Apache-2.0 license and `NOTICE` are included. All credit for the base model goes to the Wan-AI / Alibaba team. MLX conversion via Prince Canuma's [mlx-video](https://github.com/Blaizzy/mlx-video). This repository only **quantizes and re-packages** the weights for MLX; the model architecture and training are unchanged.