Views
No views yet
pip install "orbitquant[hf,kernels]>=0.6.0"~/.cache/orbitquant/kernels.
Without a matching variant, CUDA inference falls back to the Triton packed
path. Run orbitquant kernels-install to provision explicitly. For ComfyUI,
the ComfyUI-OrbitQuant
node pack provisions the same kernels from its install hook.1import torch
2from diffusers.utils import export_to_video
3from huggingface_hub import snapshot_download
4from orbitquant import load_quantized_pipeline_from_artifact
5
6artifact_id = "WaveCut/Wan2.1-T2V-1.3B-Diffusers-OrbitQuant-W4A4"
7
8artifact_dir = snapshot_download(artifact_id, repo_type="model")
9pipe = load_quantized_pipeline_from_artifact(
10 artifact_dir,
11 torch_dtype=torch.bfloat16,
12 runtime_mode="auto_fused",
13)
14pipe.enable_model_cpu_offload(device="cuda")
15
16frames = pipe(
17 prompt="A cinematic shot of a small robot walking through a neon market",
18 height=480,
19 width=832,
20 num_frames=81,
21 num_inference_steps=50,
22 guidance_scale=5.0,
23).frames[0]
24export_to_video(frames, "wan-orbitquant.mp4", fps=16)pipe.enable_sequential_cpu_offload().1import torch
2import orbitquant
3from diffusers import DiffusionPipeline
4from orbitquant import (
5 OrbitQuantConfig,
6 build_diffusers_pipeline_quantization_config,
7)
8
9qconfig = build_diffusers_pipeline_quantization_config(
10 OrbitQuantConfig(target_policy="auto"),
11 components="transformer",
12)
13pipe = DiffusionPipeline.from_pretrained(
14 "Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
15 quantization_config=qconfig,
16 torch_dtype=torch.bfloat16,
17)
18pipe.enable_model_cpu_offload()runtime_mode="auto_fused" is the default optimized runtime. On CUDA, the kernels extra provides the Triton packed fallback; a locally built native CUDA package is preferred automatically when installed. On MPS, build and install the native Metal package from the OrbitQuant source tree. See the OrbitQuant runtime instructions. Use runtime_mode="dequant_bf16" only as an explicit compatibility/debug reference path.| Setting | Value |
|---|---|
| Pipeline | WanPipeline |
| Resolution | 832x480 |
| Frames | 81 |
| Inference steps | 50 |
| Guidance scale | 5.0 |
| Export FPS | 16 |
| Output | video |
| Scope | paper video target |
| Evidence | Value |
|---|---|
| Comparison matrix | assets/video_generation_comparison_matrix.webp |
| Paired prompt/seed count | 1 |
| BF16 source generated samples | 1 |
| BF16 source generated frames | 81 |
| BF16 source nonempty outputs | 1 |
| OrbitQuant generated samples | 1 |
| OrbitQuant generated frames | 81 |
| OrbitQuant nonempty outputs | 1 |
orbitquantW4A4auto_fusedauto1e-10cudatriton_cudawanint4_rtn_group64_bf16_activation64rpbh0paperlargest_power_of_two_dividing_dimlloyd_max230006
Wan-AI/Wan2.1-T2V-1.3B-Diffusers0fad780a534b6463e45facd96134c9f345acfa5bapache-2.0model.safetensors: packed OrbitQuant/INT4 module tensors.quantization_config.json: serialized OrbitQuant runtime settings.orbitquant_manifest.json: source provenance, policies, module lists, and checksums.orbitquant_codebooks.safetensors: Lloyd-Max codebooks.orbitquant_rotations.safetensors: deterministic RPBH rotation metadata.auto_fused inference requires a packed matmul kernel and fails loudly when the required kernel is unavailable. The explicit dequant_bf16 reference mode materializes dequantized weights before BF16 matmul.