--- license: apache-2.0 base_model: Efficient-Large-Model/Sana_1600M_512px pipeline_tag: text-to-image library_name: mlx tags: - sana - mlx - apple-silicon - quantization - ternary - clark-air --- # Clark Air · Sana 1.6B · MLX 2-bit The Clark Air Sana 1.6B transformer quantized to **ternary, stored in MLX 2-bit kernels** for Apple Silicon — the first MLX port of Sana. **543 MB** vs 3.21 GB FP16. ![sample — generated end-to-end on Apple Silicon (MLX 2-bit)](sample.png) *Generated end-to-end on an M5 Max: MLX 2-bit transformer driving the denoising loop, VAE decode.* ## Contents - `clark_air_sana_mlx_2bit.safetensors` — MLX-quantized transformer (trunk ternary in MLX 2-bit slots at per-layer power-of-two groups; conditioning/projection layers kept high-precision). - `mlx_sana.py` — the MLX runtime / loader. ## Status The **transformer** (the compressed core), verified to reproduce the FP16 model across a full 20-step generation (3.4% per-step). A full standalone MLX pipeline (scheduler + text encoder + VAE) is in progress; until then run the transformer with the rest of the Sana pipeline bridged from `diffusers`. ## Usage ```python import mlx.core as mx from mlx_sana import SanaMLX sd = mx.load("clark_air_sana_mlx_2bit.safetensors") model = SanaMLX(sd) # auto-detects the packed 2-bit trunk # noise = model(latent, encoder_hidden_states, timestep, enc_mask=mask) ``` ## License Apache-2.0 © Clark Labs, Inc.