Instructions to use intel-ai/Wan2.2-I2V-A14B-Diffusers-MXFP8-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use intel-ai/Wan2.2-I2V-A14B-Diffusers-MXFP8-AutoRound with Diffusers:
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("intel-ai/Wan2.2-I2V-A14B-Diffusers-MXFP8-AutoRound", 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") - Notebooks
- Google Colab
- Kaggle
Model Details
This model is an MXFP8 (OCP microscaling FP8, group_size 32) weight-quantized model of Wan-AI/Wan2.2-I2V-A14B-Diffusers generated by intel/auto-round using zero-shot RTN. Please follow the license of the original model.
- Quantized (MXFP8): dual diffusion transformer experts (
transformerandtransformer_2) - Kept in BF16: text encoder, tokenizer, VAE, scheduler
How to Use
Environment
uv pip install vllm==0.29.0
uv pip install git+https://github.com/vllm-project/vllm-omni.git@1c7476ec19899f1e61838e23e9fad3505403b9b9
vLLM Usage
python examples/offline_inference/image_to_video/image_to_video.py \
--model intel-ai/Wan2.2-I2V-A14B-Diffusers-MXFP8-AutoRound \
--image assets/input.png \
--prompt "A cinematic shot of the scene, gentle natural motion, smooth camera movement, high quality." \
--height 720 \
--width 1280 \
--num-frames 81 \
--num-inference-steps 50 \
--guidance-scale 5.0 \
--boundary-ratio 0.9 \
--flow-shift 5.0 \
--seed 42 \
--fps 16 \
--enforce-eager \
--vae-use-tiling \
--output mxfp8.mp4
Evaluation
| Benchmark | BF16 | MXFP8 | Recovery |
|---|---|---|---|
| VBench Total Score | 83.90 | 83.50 | 99.52% |
| Quality Score | 82.80 | 82.50 | 99.64% |
| Motion Smoothness | 97.90 | 97.60 | 99.69% |
| Dynamic Degree | 74.80 | 74.40 | 99.47% |
| Subject Consistency | 96.10 | 95.80 | 99.69% |
| Background Consistency | 95.40 | 95.10 | 99.69% |
| Average | 88.48 | 88.15 | 99.62% |
Video Generation Comparison
Input image from assets/input.png:
Both examples use 1280 × 720, 81 frames, 50 inference steps, and 16 FPS.
| BF16 Reference | MXFP8 (This Model) |
|---|---|
| Watch or download BF16 Video | Watch or download MXFP8 Video |
Generate the Model
auto-round \
--model Wan-AI/Wan2.2-I2V-A14B-Diffusers \
--scheme mxfp8 \
--iters 0 \
--disable_opt_rtn \
--output_dir Wan2.2-I2V-A14B-Diffusers-MXFP8-AutoRound
Ethical Considerations and Limitations
The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs. Therefore, before deploying any applications of the model, developers should perform safety testing.
Caveats and Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Here are a couple of useful links to learn more about Intel's AI software:
Disclaimer
The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
Cite
@article{cheng2023optimize,
title={Optimize weight rounding via signed gradient descent for the quantization of llms},
author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi},
journal={arXiv preprint arXiv:2309.05516},
year={2023}
}
Signed-off-by: Wang, Chang chang1.wang@intel.com
- Downloads last month
- 51
Model tree for intel-ai/Wan2.2-I2V-A14B-Diffusers-MXFP8-AutoRound
Base model
Wan-AI/Wan2.2-I2V-A14B-Diffusers