How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image, export_to_video

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("rockerBOO/wan2.2-I2V-A14B-nvfp4", torch_dtype=torch.bfloat16, device_map="cuda")
pipe.to("cuda")

prompt = "A man with short gray hair plays a red electric guitar."
image = load_image(
    "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png"
)

output = pipe(image=image, prompt=prompt).frames[0]
export_to_video(output, "output.mp4")

Wan2.2-I2V-A14B (NVFP4)

NVFP4 quantized version of Wan-AI/Wan2.2-I2V-A14B, a 14B-parameter image-to-video diffusion model. Wan2.2-I2V-A14B ships as two separate MoE-style diffusion transformers ("high noise" and "low noise" experts, switched between during the denoising schedule); both are quantized here as standalone files.

Files

File Size Source
wan2.2_i2v_a14b_high_noise_nvfp4.safetensors 8.9 GB high_noise_model/
wan2.2_i2v_a14b_low_noise_nvfp4.safetensors 8.9 GB low_noise_model/

Each original fp32 model was 57 GB; NVFP4 quantization brings each down to ~8.9 GB (6.4x smaller).

Requirements

NVFP4 (FP4 E2M1 block quantization) requires a Blackwell GPU (SM >= 10.0/12.0) for inference (e.g. RTX 50-series, B100/B200). Converted and tested on an RTX 5070 Ti.

Load with ComfyUI (or any loader supporting .comfy_quant metadata for NVFP4 weights).

Quantization method

Quantized with the convert-to-quant (ctq) CLI tool using NVFP4 (FP4 E2M1) block quantization, Comfy-quant format, and the built-in --wan exclusion filter (keeps embeddings, text/time encoders, and the output head in full precision β€” only the transformer block linear weights are quantized).

Why per-shard quantization

The upstream repo ships each model split into 6 safetensors shards (diffusion_pytorch_model-0000X-of-00006.safetensors), but ctq only accepts a single input file. Rather than first reassembling a ~57 GB raw fp32 file (which would roughly double peak disk usage during conversion), each shard was quantized independently and the resulting (much smaller) quantized shards were merged afterward. Quantization in ctq operates per-tensor with no cross-tensor state, so this produces output identical to quantizing a pre-merged file.

Steps

  1. Download each model's shards from the source repo:
    hf download Wan-AI/Wan2.2-I2V-A14B --include "high_noise_model/*" --local-dir raw
    hf download Wan-AI/Wan2.2-I2V-A14B --include "low_noise_model/*" --local-dir raw
    
  2. Quantize each of the 6 shards per model independently:
    uv run --with convert-to-quant --with triton --with safetensors --with tqdm --with numpy ctq \
      -i raw/<high|low>_noise_model/diffusion_pytorch_model-0000X-of-00006.safetensors \
      -o quantized_shards/<high|low>_noise_model/diffusion_pytorch_model-0000X-of-00006.safetensors \
      --wan --nvfp4 --comfy_quant --save-quant-metadata --simple --low-memory
    
  3. Merge the 6 quantized shards per model into a single safetensors file, combining the per-shard _quantization_metadata header entries into one (see merge_quantized_shards.py in the parent directory).
  4. Delete the raw fp32 shards and per-shard quantized intermediates, keeping only the merged file.
  5. Repeat sequentially for the other noise model (high noise fully downloaded, quantized, merged, and cleaned up before starting low noise) to keep peak disk usage manageable.

Each final file: 2295 tensors, 400 quantized layers (verified via the _quantization_metadata header).

Flags used:

  • --nvfp4 β€” FP4 E2M1 block quantization
  • --comfy_quant β€” Comfy quantization tensor/metadata format
  • --wan β€” WAN video model exclusion filter (skip embeddings, encoders, head)
  • --simple β€” skip SVD optimization, use simple quantization
  • --save-quant-metadata β€” embed _quantization_metadata in the safetensors header
  • --low-memory β€” stream tensors during quantization to reduce RAM usage

License

Apache 2.0, inherited from the base model Wan-AI/Wan2.2-I2V-A14B.

Downloads last month
142
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for rockerBOO/wan2.2-I2V-A14B-nvfp4

Quantized
(55)
this model