WaveCut commited on
Commit
d9f42ee
·
verified ·
1 Parent(s): 1251424

Refresh OrbitQuant model cards

Browse files
Files changed (2) hide show
  1. README.md +64 -2
  2. SHA256SUMS +1 -1
README.md CHANGED
@@ -1,14 +1,51 @@
1
  ---
2
  base_model: Tongyi-MAI/Z-Image-Turbo
 
3
  tags:
4
  - orbitquant
5
  - quantized
6
  - diffusers
 
7
  ---
8
 
9
  # Tongyi-MAI/Z-Image-Turbo OrbitQuant W2A4
10
 
11
- This is an OrbitQuant artifact generated from the source model listed above.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  ## Quantization
14
 
@@ -26,9 +63,24 @@ This is an OrbitQuant artifact generated from the source model listed above.
26
  - Block size policy: `largest_power_of_two_dividing_dim`
27
  - Codebook: `lloyd_max`
28
  - Codebook version: `1`
 
 
 
29
  - Calibration data: none
30
  - Text encoders and VAE: left in source precision by default
31
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  ## Source
33
 
34
  - Model: `Tongyi-MAI/Z-Image-Turbo`
@@ -36,6 +88,16 @@ This is an OrbitQuant artifact generated from the source model listed above.
36
  - Source license: `apache-2.0`
37
  - OrbitQuant paper: https://arxiv.org/abs/2607.02461
38
 
 
 
 
 
 
 
 
 
39
  ## Limitations
40
 
41
- The initial runtime may dequantize packed weights before BF16 matmul. Disk artifacts are compact; current CUDA/MPS kernels optimize selected activation codebook lookup/rescale stages and packed weight dequantization; full fused low-bit kernels are separate work.
 
 
 
1
  ---
2
  base_model: Tongyi-MAI/Z-Image-Turbo
3
+ license: apache-2.0
4
  tags:
5
  - orbitquant
6
  - quantized
7
  - diffusers
8
+ - diffusion-transformer
9
  ---
10
 
11
  # Tongyi-MAI/Z-Image-Turbo OrbitQuant W2A4
12
 
13
+ This repository contains a compact OrbitQuant transformer-component artifact for the source Diffusers model listed above. It is intended to be loaded into the original pipeline, not used as a standalone Diffusers pipeline repository.
14
+
15
+ OrbitQuant is a calibration-free post-training quantization method for image and video diffusion transformers. This artifact keeps the text encoders, VAE, embeddings, timestep MLP, and final heads in the source precision by default and replaces the transformer linear projections with OrbitQuant modules.
16
+
17
+ ## Usage
18
+
19
+ Install the package from this repository, then load the base pipeline and patch its transformer component with this artifact:
20
+
21
+ ```python
22
+ import torch
23
+ from diffusers import DiffusionPipeline
24
+ from huggingface_hub import snapshot_download
25
+ from orbitquant import load_quantized_pipeline_component
26
+
27
+ base_model = "Tongyi-MAI/Z-Image-Turbo"
28
+ artifact_id = "WaveCut/Z-Image-Turbo-OrbitQuant-W2A4"
29
+
30
+ artifact_dir = snapshot_download(artifact_id, repo_type="model")
31
+ pipe = DiffusionPipeline.from_pretrained(
32
+ base_model,
33
+ torch_dtype=torch.bfloat16,
34
+ )
35
+ load_quantized_pipeline_component(
36
+ pipe,
37
+ artifact_dir,
38
+ component="transformer",
39
+ device="cuda",
40
+ )
41
+ pipe.to("cuda")
42
+
43
+ result = pipe(
44
+ prompt="A precise product photo of a red ceramic mug on a wooden desk",
45
+ )
46
+ ```
47
+
48
+ For model-specific pipelines, you may replace `DiffusionPipeline` with the matching Diffusers class, such as `FluxPipeline`, `Flux2KleinPipeline`, `ZImagePipeline`, or `WanPipeline` when your Diffusers version provides it.
49
 
50
  ## Quantization
51
 
 
63
  - Block size policy: `largest_power_of_two_dividing_dim`
64
  - Codebook: `lloyd_max`
65
  - Codebook version: `1`
66
+ - Quantized transformer modules: `238`
67
+ - AdaLN INT4 modules: `32`
68
+ - Skipped modules: `6`
69
  - Calibration data: none
70
  - Text encoders and VAE: left in source precision by default
71
 
72
+ ## Visual Comparison
73
+
74
+ The following assets are stored in this artifact and compare the BF16 base generation against the OrbitQuant generation with the same prompt and seed.
75
+
76
+ ![assets/original_vs_orbitquant_z-image-native_seed0_W2A4_color-binding.webp](assets/original_vs_orbitquant_z-image-native_seed0_W2A4_color-binding.webp)
77
+
78
+ ![assets/original_vs_orbitquant_z-image-native_seed0_W2A4_counting.webp](assets/original_vs_orbitquant_z-image-native_seed0_W2A4_counting.webp)
79
+
80
+ ![assets/original_vs_orbitquant_z-image-native_seed0_W2A4_cyrillic-text-rendering.webp](assets/original_vs_orbitquant_z-image-native_seed0_W2A4_cyrillic-text-rendering.webp)
81
+
82
+ ![assets/original_vs_orbitquant_z-image-native_seed0_W2A4_english-text-rendering.webp](assets/original_vs_orbitquant_z-image-native_seed0_W2A4_english-text-rendering.webp)
83
+
84
  ## Source
85
 
86
  - Model: `Tongyi-MAI/Z-Image-Turbo`
 
88
  - Source license: `apache-2.0`
89
  - OrbitQuant paper: https://arxiv.org/abs/2607.02461
90
 
91
+ ## Artifact Files
92
+
93
+ - `model.safetensors`: packed OrbitQuant/INT4 module tensors.
94
+ - `quantization_config.json`: serialized OrbitQuant runtime settings.
95
+ - `orbitquant_manifest.json`: source provenance, policies, module lists, and checksums.
96
+ - `orbitquant_codebooks.safetensors`: Lloyd-Max codebooks.
97
+ - `orbitquant_rotations.safetensors`: deterministic RPBH rotation metadata.
98
+
99
  ## Limitations
100
 
101
+ - This is a transformer-component artifact; load it into the source pipeline as shown above.
102
+ - Runtime mode may dequantize packed weights before BF16 matmul. Disk artifacts are compact, while runtime VRAM depends on the selected backend.
103
+ - Quality depends on the source model and bit setting. Very low-bit settings can degrade prompt following or visual detail.
SHA256SUMS CHANGED
@@ -1,4 +1,4 @@
1
- a6adb8aac7ec6ed41f1f4c770511be9f3530e359e1689f79183277a812a01568 README.md
2
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 assets/.gitkeep
3
  8c8731e445b7cefae4b0fb1aa5c716bc01b2c91f67e34d46bf6afc40a02aec0f assets/original_vs_orbitquant_z-image-native_seed0_W2A4_color-binding.webp
4
  4a58042eadc55289dd18b1c0841e95dbd9a3f7ba4fa63178af43bfe4918ed8db assets/original_vs_orbitquant_z-image-native_seed0_W2A4_counting.webp
 
1
+ 7b22614723a9322935b2c9af7bab35bbef5c24489b06dfdba2101ee78ecb4de9 README.md
2
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 assets/.gitkeep
3
  8c8731e445b7cefae4b0fb1aa5c716bc01b2c91f67e34d46bf6afc40a02aec0f assets/original_vs_orbitquant_z-image-native_seed0_W2A4_color-binding.webp
4
  4a58042eadc55289dd18b1c0841e95dbd9a3f7ba4fa63178af43bfe4918ed8db assets/original_vs_orbitquant_z-image-native_seed0_W2A4_counting.webp