sdxl-base-mlx / README.md
SceneWorks's picture
Upload README.md with huggingface_hub
f738937 verified
|
Raw
History Blame
2.04 kB
metadata
license: openrail++
tags:
  - mlx
  - apple-silicon
  - diffusion
  - stable-diffusion-xl
  - sdxl
  - text-to-image
base_model: stabilityai/stable-diffusion-xl-base-1.0
library_name: mlx-gen
pipeline_tag: text-to-image

Stable Diffusion XL base 1.0 — MLX pre-quantized tiers

Pre-quantized, packed-load tiers of stabilityai/stable-diffusion-xl-base-1.0 for on-device Apple-Silicon inference with SceneWorks / mlx-gen (the sdxl generator). Each tier is a self-contained diffusers turnkey snapshot (U-Net + both CLIP text encoders + VAE + tokenizers + scheduler + model_index.json) that loads directly — no in-app quantization pass, no dense transient.

Dual CLIP-L + OpenCLIP-bigG text encoders, real classifier-free guidance + negative prompt, sdxl-family LoRA support. ~30 steps at guidance 7.0, native 1024×1024.

Tiers

dir precision what's quantized
q4/ (default) group-wise affine Q4, group size 64 U-Net Linears + both CLIP encoders
q8/ group-wise affine Q8, group size 64 U-Net Linears + both CLIP encoders
bf16/ dense (full-precision master) nothing — verbatim source mirror

The VAE stays dense (f32) in every tier (the SDXL VAE is int8/fp16-unstable). Convolutions, GroupNorms, and the CLIP token/position embeddings also stay dense; only the true Linear projections are packed. Quantization is byte-identical to mlx-gen's load-time nn.quantize (bf16 cast, group 64).

Usage

use mlx_gen::{LoadSpec, WeightsSource, Quant};
let spec = LoadSpec::new(WeightsSource::Dir("…/sdxl-base-mlx/q4".into())).with_quant(Quant::Q4);
let g = mlx_gen::load("sdxl", &spec)?;

License

openrail++ (CreativeML Open RAIL++-M) — inherited from the source model stabilityai/stable-diffusion-xl-base-1.0. See LICENSE.