apple/ml-stable-diffusion
A Python package and Swift library for converting Stable Diffusion models to Core ML format and generating images on Apple Silicon.

This repository provides tools to convert Stable Diffusion models from PyTorch to Core ML format for deployment on Apple devices including Mac, iPad, and iPhone. It includes a Python package for model conversion and inference using Hugging Face diffusers, plus a Swift package for integrating image generation into iOS/macOS Xcode projects. The implementation targets Apple Silicon (M1 and A14+) and supports various compute units and attention implementations for optimized performance.