Instructions to use ApacheOne/Wan2.2-Animate-2-14B-OrbitQuant-W4A4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ApacheOne/Wan2.2-Animate-2-14B-OrbitQuant-W4A4 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("ApacheOne/Wan2.2-Animate-2-14B-OrbitQuant-W4A4", 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
Wan2.2 Animate-2 14B Distilled โ OrbitQuant W4A4
Packed OrbitQuant W4A4 transformer for:
Wan-AI/Wan2.2-Animate-2-14B-Distilled-Diffusers
Quantization
This artifact uses:
- 4-bit packed nonuniform OrbitQuant weights
- online 4-bit OrbitQuant activations
- RPBH rotation
- exact-density Lloyd-Max codebooks
- BF16 per-row weight scales
- custom Triton packed W4 ร A4 GEMM
- no dense target transformer weights at runtime
Transformer architecture:
- 40 layers
- hidden dimension: 5120
- FFN dimension: 13824
- 40 attention heads
- 480 packed target linear layers
- 823 non-target tensors retained
- 1303 transformer tensors total
Files
The twelve:
orbitquant-runtime-00001.safetensors
through
orbitquant-runtime-00012.safetensors
contain the packed transformer and non-target tensors.
orbitquant_rotations.safetensors contains the OrbitQuant rotation /
codebook data.
packed_manifest.json describes every packed target, tensor location,
shape, packed layout, row scale, quantization statistics, and audit.
Runtime
The runtime/ directory contains the custom OrbitQuant loader and
Triton W4A4 runtime used for validation.
This is not a normal Diffusers dense transformer checkpoint and requires the included OrbitQuant runtime.
Other Wan-Animate-2 components
This repository contains the OrbitQuant transformer artifact.
Text encoder, image encoder, VAE, tokenizers, and other non-transformer components should be obtained from the upstream Wan-Animate-2 model.
Validation
Validated end-to-end on an NVIDIA L4 using CUDA 12.8.
The runtime CUDA gate verified:
- RPBH activation rotation
- online Lloyd-Max A4 packing
- packed nonuniform W4 ร A4 Triton GEMM
- actual packed transformer matrices
All 480 packed target modules were exercised during end-to-end Wan-Animate-2 inference.
See:
validation/orbitquant_w4a4_cuda_gate.json
for the recorded kernel validation data.
- Downloads last month
- 121