Run Stable Diffusion in Apple Core ML using compute-unit selection and model variants
Use Apple-provided converted Stable Diffusion Core ML checkpoints, choose between attention implementation variants, and control which compute units (CPU, GPU, Neural Engine) Core ML is allowed to use during inference.
Discovered 2026-11-10 · Sources checked 2026-11-10
Why it matters
This approach enables running Stable Diffusion on Apple Silicon via Core ML while adapting to the device’s available compute units. It also lets you trade off different model variants (notably attention implementations) and choose the appropriate model package format for the runtime (Python vs Swift).
What changed
Converted Stable Diffusion weights are made available as Core ML packages, organized into multiple variants (e.g., different attention implementations and package vs compiled forms), and inference can be configured to run on specific compute units.
Where it helps
- On-device text-to-image generation on Apple Silicon using Core ML
- Python-based inference using the ML packages model variants
- Swift-based inference using compiled .mlmodelc bundles
- Experimenting with attention variant choices (original vs split_einsum) for a given device
Evidence & reproduction
Reproduction not evaluated. A linked paper or repository does not establish independent reproduction.
Limitations & open questions
The source notes that certain Core ML improvements introduced in macOS Ventura 13.1 are required by Apple’s implementation; using older macOS versions may lead to black images and slower generation.
Sources
- Using Stable Diffusion with Core ML on Apple Silicon ↗
Hugging Face · primary · Published 2022-12-01 · Checked 2026-11-10
