Core ML Stable Diffusion is Apple’s official open-source implementation of Stable Diffusion optimized for Apple Silicon. It converts the PyTorch diffusion models into Core ML format so image generation runs fast and efficiently on the Neural Engine and GPU of Macs, iPhones and iPads. Released alongside Apple’s machine learning research in late 2022, it has earned about 18,000 stars on GitHub.
The repository has two halves: a Python package that converts and compresses PyTorch Stable Diffusion models (including SDXL and Stable Diffusion 3) into Core ML format using Hugging Face diffusers, and a Swift package that developers add to Xcode projects to run image generation natively in their apps. Apple put serious work into optimization: attention implementations tuned per device, and weight palettization that compresses models to 6-bit or even lower precision so they fit and run on phones, with published benchmarks showing 512×512 generation in seconds on recent iPhones. Ready-made converted models are also published on the Hugging Face Hub, and ControlNet models are supported.
Core ML Stable Diffusion is completely free and open source under the MIT license. The underlying Stable Diffusion model weights carry their own licenses, which you should check for your use case.
This is for Apple platform developers who want private, offline, on-device text-to-image generation in their Mac, iPhone or iPad apps without any server or API dependency.