WaveCut commited on
Commit
d97bb6e
·
verified ·
1 Parent(s): 39156f1

Add model-specific OrbitQuant usage examples

Browse files
Files changed (2) hide show
  1. README.md +11 -8
  2. SHA256SUMS +1 -1
README.md CHANGED
@@ -20,7 +20,7 @@ Install the package from this repository, then load the base pipeline and patch
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
 
@@ -28,7 +28,7 @@ base_model = "black-forest-labs/FLUX.1-schnell"
28
  artifact_id = "WaveCut/FLUX.1-schnell-OrbitQuant-W2A3"
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
  )
@@ -40,13 +40,16 @@ load_quantized_pipeline_component(
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
 
52
  - Method: `orbitquant`
@@ -73,14 +76,14 @@ For model-specific pipelines, you may replace `DiffusionPipeline` with the match
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_flux1-schnell-native_seed0_W2A3_color-binding.webp](assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_color-binding.webp)
77
 
78
  ![assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_counting.webp](assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_counting.webp)
79
 
80
  ![assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_cyrillic-text-rendering.webp](assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_cyrillic-text-rendering.webp)
81
 
82
- ![assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_english-text-rendering.webp](assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_english-text-rendering.webp)
83
-
84
  ## Source
85
 
86
  - Model: `black-forest-labs/FLUX.1-schnell`
 
20
 
21
  ```python
22
  import torch
23
+ from diffusers import FluxPipeline
24
  from huggingface_hub import snapshot_download
25
  from orbitquant import load_quantized_pipeline_component
26
 
 
28
  artifact_id = "WaveCut/FLUX.1-schnell-OrbitQuant-W2A3"
29
 
30
  artifact_dir = snapshot_download(artifact_id, repo_type="model")
31
+ pipe = FluxPipeline.from_pretrained(
32
  base_model,
33
  torch_dtype=torch.bfloat16,
34
  )
 
40
  )
41
  pipe.to("cuda")
42
 
43
+ image = pipe(
44
  prompt="A precise product photo of a red ceramic mug on a wooden desk",
45
+ height=1024,
46
+ width=1024,
47
+ num_inference_steps=4,
48
+ guidance_scale=0.0,
49
+ ).images[0]
50
+ image.save("flux1-schnell-orbitquant.png")
51
  ```
52
 
 
 
53
  ## Quantization
54
 
55
  - Method: `orbitquant`
 
76
 
77
  The following assets are stored in this artifact and compare the BF16 base generation against the OrbitQuant generation with the same prompt and seed.
78
 
79
+ ![reports/native/flux1-w2a3-3a250bd/assets/image_generation_comparison_matrix.webp](reports/native/flux1-w2a3-3a250bd/assets/image_generation_comparison_matrix.webp)
80
+
81
  ![assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_color-binding.webp](assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_color-binding.webp)
82
 
83
  ![assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_counting.webp](assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_counting.webp)
84
 
85
  ![assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_cyrillic-text-rendering.webp](assets/original_vs_orbitquant_flux1-schnell-native_seed0_W2A3_cyrillic-text-rendering.webp)
86
 
 
 
87
  ## Source
88
 
89
  - Model: `black-forest-labs/FLUX.1-schnell`
SHA256SUMS CHANGED
@@ -1,4 +1,4 @@
1
- c9cf5f26db227e1162ff009171091a75c57826edaa5c7f581b9180180982e342 README.md
2
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 assets/.gitkeep
3
  ef315b50cd3602b3cf3305045b079aee61df216cd361c68351278f3d06802534 assets/flux1-schnell-native_seed0_W2A3_color-binding.png
4
  9839b8e414d7fec36b35d382aa6e1e8e7048f226310a15c7d88a7b2b2c35c704 assets/flux1-schnell-native_seed0_W2A3_color-binding.png.json
 
1
+ 6c8610746eb28281d7516bf08674950e1ffd13108ce8cb839072043fff5b57d5 README.md
2
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 assets/.gitkeep
3
  ef315b50cd3602b3cf3305045b079aee61df216cd361c68351278f3d06802534 assets/flux1-schnell-native_seed0_W2A3_color-binding.png
4
  9839b8e414d7fec36b35d382aa6e1e8e7048f226310a15c7d88a7b2b2c35c704 assets/flux1-schnell-native_seed0_W2A3_color-binding.png.json