mlx-diffuser¶
Diffusion & flow models on Apple silicon, powered by MLX.
Train from scratch, fine-tune, or run inference β for image, video, and discrete
modalities β from one small, readable codebase. If you know PyTorch and
π€ diffusers, you already know this library.
from mlx_diffuser import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained("path/or/hub-id", dtype="bf16", quantize=4)
images = pipe([1, 2, 3], num_inference_steps=50, guidance_scale=4.0, seed=0)
Why MLX?¶
- Unified memory β no hostβdevice copies; run models larger than a discrete GPU's VRAM on a Mac.
mx.compile+ fused kernels βmx.fast.scaled_dot_product_attention, lazy evaluation, compiled training and sampling steps.- Weight quantization β 4/8-bit so large models fit on 16β32 GB machines.
- Low power β fanless inference and fine-tuning, no cloud GPU rental.
Where to next¶
- Installation
- Quickstart β generate, train, fine-tune
- Concepts β the process / network / pipeline model
- Guides and the API reference