Wan 2.2 TI2V-5B β€” PRIME-Quant (100% V3_P4_0, Zero CPU Offload)

A 100% 4-bit Prime-Harmonic (V3_P4_0) quantization of Wan-AI/Wan2.2-TI2V-5B-Diffusers (5.0B 3D DiT + 5.68B UMT5-XXL, upstream Apache-2.0) supporting both Text-to-Video (T2V) and Image-to-Video (I2V) β€” built with PRIME-Quant (@batteryphil).

Compresses the entire ~21.4 GB BF16 Wan 2.2 TI2V-5B stack down to 6.01 GB on disk (3.56Γ— compression) β€” running 100% GPU-resident with zero CPU offload (7.27 GB resident VRAM, 9.73 GB peak with tiled BF16 AutoencoderKLWan) on a single 12–16 GB AMD ROCm or NVIDIA CUDA GPU, faster than BF16 CPU-offload.


Verified Benchmark Results (AMD RX 9060 XT 16 GB, ROCm 7.2)

All measurements freshly executed at 832Γ—480, 33 frames (16 fps), 24 steps, CFG 5.0, identical tiled BF16 AutoencoderKLWan (benchmarks/wan22_bf16_vs_prime_benchmark.json):

Metric BF16 Baseline (Model CPU Offload) PRIME-Quant (100% V3_P4_0, Zero CPU Offload)
Compressed Weights on Disk ~21.4 GB 6.01 GB (3.20 GB UMT5-XXL + 2.82 GB 5B DiT β€” 3.56Γ— smaller)
Quantized Weight Coverage 0 / 476 476 / 476 (100%) (169/169 UMT5-XXL + 307/307 3D DiT)
Total GPU-Resident Footprint Cannot fit on 16 GB 7,265.2 MB (UMT5-XXL + 5B 3D DiT + VAE all resident)
Peak PyTorch VRAM (832Γ—480, 33f) 11,076.4 MB 9,730.1 MB (zero CPU offload!)
Mean T2V Render Time (33f, 24 steps) 101.25 s 88.07 s (1.15Γ— faster)
I2V Render Time (33f, 24 steps) 257.41 s 88.49 s (2.91Γ— faster)
I2V Frame-0 Anchoring Parity Reference 99.9 dB PSNR / 1.0000 SSIM (zero first-frame pop!)
I2V All-33-Frame Parity (BF16 vs. P4_0) Reference 29.37 dB mean PSNR / 0.9849 mean SSIM

Visual Parity (Top Row = BF16 Teacher, Bottom Row = 100% PRIME-Quant V3_P4_0)

Image-to-Video (End-to-End FLUX.1-schnell PRIME-Quant β†’ Wan 2.2 TI2V-5B PRIME-Quant, 29.37 dB / 0.9849 SSIM): Wan 2.2 I2V Sailor BF16 vs PRIME-Quant

Text-to-Video (832Γ—480, 33 frames, 24 steps): Wan 2.2 Alpine Lake BF16 vs PRIME-Quant Wan 2.2 Neon Tokyo Rain BF16 vs PRIME-Quant Wan 2.2 Watch Macro BF16 vs PRIME-Quant


Quantization Architecture Highlights

  1. 100% V3_P4_0 Group-32 Prime-Harmonic Codebook: Zero BF16 weights in either UMT5-XXL (including 16K-row streamed [256384, 4096] shared vocab embedding) or the 5.0B WanTransformer3DModel (22.58 dB mean / 22.15 dB floor weight SNR across all 30 3D DiT blocks).
  2. Exact Zero-Overhead H_64 / H_128 Walsh-Hadamard Rotations: sa.v <-> sa.o in all 24 UMT5-XXL blocks (with FP32 on-the-fly unpack protection on wo), plus to_v <-> to_out.0 in both self-attention and cross-attention across all 30 WanTransformerBlocks.
  3. 4,096-Timestep Frame-0 Anchored PRIMAL + Co-Adapted text_embedder:
    • time_embedder + time_proj calibrated across t=0 Frame-0 anchor + [0..1000] reaches 53.72 dB SNR, preserving Frame-0 I2V anchoring to 99.9 dB / 1.0000 SSIM.
    • Co-Adapted text_embedder Kronecker PRIMAL maps 4-bit UMT5-XXL directly onto the BF16 Teacher text_embedder.
  4. RDNA4 / 16 GB Tiled BF16 VAE Tip: Always keep vae.enable_tiling() with bfloat16 on AutoencoderKLWan (29.5 s / 4.07 GB peak vs. 10.46 GB untiled on ROCm 7.2).

Quickstart (Standalone β€” Zero Extra Repos Required)

pip install -r requirements.txt

# Text-to-Video (T2V):
TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 \
python run_wan22_prime.py \
    --prompt "Cinematic aerial drone glide over a mirror-calm alpine lake at golden sunrise, snow-capped peaks" \
    --width 832 --height 480 --num-frames 33 --steps 24 --seed 42 \
    --output alpine_prime.mp4

# Image-to-Video (I2V):
TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 \
python run_wan22_prime.py \
    --image frame0.png \
    --prompt "The subject slowly turns toward the golden ocean breeze, subtle natural motion, 85mm shallow depth of field" \
    --width 832 --height 480 --num-frames 33 --steps 24 --seed 77 \
    --output i2v_prime.mp4

run_wan22_prime.py automatically downloads only the lightweight tokenizer, config, scheduler, and AutoencoderKLWan VAE from Wan-AI/Wan2.2-TI2V-5B-Diffusers β€” it never downloads the 21.4 GB BF16 weights.


Licensing & Attribution

  • PRIME-Quant checkpoints & standalone runtime (prime_infer_runtime.py, run_wan22_prime.py): Copyright (c) 2026 Philip Bartsch (@batteryphil), licensed under the Bartsch Personal-Free & 5% Commercial Profit-Share License v1.0 (free for personal, research, academic, and non-profit use).
  • Upstream Base Model (Wan2.2-TI2V-5B): Apache License 2.0 by Wan-AI (Alibaba Tongyi Lab) β€” see NOTICE.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for batteryphil/Wan2.2-TI2V-5B-PRIME-Quant

Quantized
(2)
this model