SceneWorks commited on
Commit
f738937
·
verified ·
1 Parent(s): f856eb4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +51 -0
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: openrail++
3
+ tags:
4
+ - mlx
5
+ - apple-silicon
6
+ - diffusion
7
+ - stable-diffusion-xl
8
+ - sdxl
9
+ - text-to-image
10
+ base_model: stabilityai/stable-diffusion-xl-base-1.0
11
+ library_name: mlx-gen
12
+ pipeline_tag: text-to-image
13
+ ---
14
+
15
+ # Stable Diffusion XL base 1.0 — MLX pre-quantized tiers
16
+
17
+ Pre-quantized, packed-load tiers of
18
+ [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0)
19
+ for on-device Apple-Silicon inference with [SceneWorks / `mlx-gen`](https://github.com/SceneWorks/mlx-gen)
20
+ (the `sdxl` generator). Each tier is a **self-contained diffusers turnkey snapshot** (U-Net + both
21
+ CLIP text encoders + VAE + tokenizers + scheduler + `model_index.json`) that loads directly — no
22
+ in-app quantization pass, no dense transient.
23
+
24
+ Dual CLIP-L + OpenCLIP-bigG text encoders, real classifier-free guidance + negative prompt,
25
+ sdxl-family LoRA support. ~30 steps at guidance 7.0, native 1024×1024.
26
+
27
+ ## Tiers
28
+
29
+ | dir | precision | what's quantized |
30
+ |----------|-----------|------------------|
31
+ | `q4/` (default) | group-wise affine Q4, group size 64 | U-Net Linears + both CLIP encoders |
32
+ | `q8/` | group-wise affine Q8, group size 64 | U-Net Linears + both CLIP encoders |
33
+ | `bf16/` | dense (full-precision master) | nothing — verbatim source mirror |
34
+
35
+ The **VAE stays dense (f32)** in every tier (the SDXL VAE is int8/fp16-unstable). Convolutions,
36
+ GroupNorms, and the CLIP token/position embeddings also stay dense; only the true Linear projections
37
+ are packed. Quantization is byte-identical to `mlx-gen`'s load-time `nn.quantize` (bf16 cast, group
38
+ 64).
39
+
40
+ ## Usage
41
+
42
+ ```rust
43
+ use mlx_gen::{LoadSpec, WeightsSource, Quant};
44
+ let spec = LoadSpec::new(WeightsSource::Dir("…/sdxl-base-mlx/q4".into())).with_quant(Quant::Q4);
45
+ let g = mlx_gen::load("sdxl", &spec)?;
46
+ ```
47
+
48
+ ## License
49
+
50
+ openrail++ (CreativeML Open RAIL++-M) — inherited from the source model
51
+ [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0). See `LICENSE`.