Using Stable Diffusion with Core ML on Apple Silicon
📰 Hugging Face Blog
Run Stable Diffusion on Apple Silicon using Core ML with pre-converted models on Hugging Face Hub
Action Steps
- Download the pre-converted Core ML models from Hugging Face Hub
- Use the Core ML inference code in Python or Swift to run the models
- Optimize the models for specific use cases, such as image generation or editing
Who Needs to Know This
Machine learning engineers and developers working on Apple devices can benefit from this integration to run Stable Diffusion models locally, improving performance and reducing latency
Key Insight
💡 Pre-converted Core ML models are available on Hugging Face Hub, making it easy to run Stable Diffusion on Apple devices
Share This
🚀 Run Stable Diffusion on Apple Silicon with Core ML! 💻
Key Takeaways
Run Stable Diffusion on Apple Silicon using Core ML with pre-converted models on Hugging Face Hub
Full Article
Published Time: 2022-12-01T00:00:00.155Z
# Using Stable Diffusion with Core ML on Apple Silicon
[Hugging Face](https://huggingface.co/)
* [Models](https://huggingface.co/models)
* [Datasets](https://huggingface.co/datasets)
* [Spaces](https://huggingface.co/spaces)
* [Buckets new](https://huggingface.co/storage)
* [Docs](https://huggingface.co/docs)
* [Enterprise](https://huggingface.co/enterprise)
* [Pricing](https://huggingface.co/pricing)
*
*
* * *
* [Log In](https://huggingface.co/login)
* [Sign Up](https://huggingface.co/join)
[Back to Articles](https://huggingface.co/blog)
# [](https://huggingface.co/blog/diffusers-coreml#using-stable-diffusion-with-core-ml-on-apple-silicon) Using Stable Diffusion with Core ML on Apple Silicon
Published December 1, 2022
[Update on GitHub](https://github.com/huggingface/blog/blob/main/diffusers-coreml.md)
[- [x] Upvote 8](https://huggingface.co/login?next=%2Fblog%2Fdiffusers-coreml)
* [](https://huggingface.co/osanseviero "osanseviero")
* [](https://huggingface.co/WildGenie "WildGenie")
* [](https://huggingface.co/gheorgheiuga "gheorgheiuga")
* [](https://huggingface.co/instablejay "instablejay")
* [](https://huggingface.co/Jarrodbarnes "Jarrodbarnes")
* [](https://huggingface.co/relfa "relfa")
* +2
[](https://huggingface.co/pcuenq)
[Pedro Cuenca pcuenq Follow](https://huggingface.co/pcuenq)
* [Available Checkpoints](https://huggingface.co/blog/diffusers-coreml#available-checkpoints "Available Checkpoints")
* [Notes on Performance](https://huggingface.co/blog/diffusers-coreml#notes-on-performance "Notes on Performance")
* [Core ML Inference in Python](https://huggingface.co/blog/diffusers-coreml#core-ml-inference-in-python "Core ML Inference in Python")
* [Prerequisites](https://huggingface.co/blog/diffusers-coreml#prerequisites "Prerequisites")
* [Download the Model Checkpoints](https://huggingface.co/blog/diffusers-coreml#download-the-model-checkpoints "Download the Model Checkpoints")
* [Inference](https://huggingface.co/blog/diffusers-coreml#inference "Inference")
* [Core ML inference in Swift](https://huggingface.co/blog/diffusers-coreml#core-ml-inference-in-swift "Core ML inference in Swift")
* [Download](https://huggingface.co/blog/diffusers-coreml#download "Download")
* [Inference](https://huggingface.co/blog/diffusers-coreml#inference-1 "Inference")
* [Bring Your own Model](https://huggingface.co/blog/diffusers-coreml#bring-your-own-model "Bring Your own Model")
* [Next Steps](https://huggingface.co/blog/diffusers-coreml#next-steps "Next Steps")
Thanks to Apple engineers, you can now run Stable Diffusion on Apple Silicon using Core ML!
[This Apple repo](https://github.com/apple/ml-stable-diffusion) provides conversion scripts and inference code based on [🧨 Diffusers](https://github.com/huggingface/diffusers), and we love it! To make it as easy as possible for you, we converted the weights ourselves and put the Core ML versions of the models in [the Hugging Face Hub](https://hf.co/apple).
**Update**: some weeks after this post was written we created a
# Using Stable Diffusion with Core ML on Apple Silicon
[Hugging Face](https://huggingface.co/)
* [Models](https://huggingface.co/models)
* [Datasets](https://huggingface.co/datasets)
* [Spaces](https://huggingface.co/spaces)
* [Buckets new](https://huggingface.co/storage)
* [Docs](https://huggingface.co/docs)
* [Enterprise](https://huggingface.co/enterprise)
* [Pricing](https://huggingface.co/pricing)
*
*
* * *
* [Log In](https://huggingface.co/login)
* [Sign Up](https://huggingface.co/join)
[Back to Articles](https://huggingface.co/blog)
# [](https://huggingface.co/blog/diffusers-coreml#using-stable-diffusion-with-core-ml-on-apple-silicon) Using Stable Diffusion with Core ML on Apple Silicon
Published December 1, 2022
[Update on GitHub](https://github.com/huggingface/blog/blob/main/diffusers-coreml.md)
[- [x] Upvote 8](https://huggingface.co/login?next=%2Fblog%2Fdiffusers-coreml)
* [](https://huggingface.co/osanseviero "osanseviero")
* [](https://huggingface.co/WildGenie "WildGenie")
* [](https://huggingface.co/gheorgheiuga "gheorgheiuga")
* [](https://huggingface.co/instablejay "instablejay")
* [](https://huggingface.co/Jarrodbarnes "Jarrodbarnes")
* [](https://huggingface.co/relfa "relfa")
* +2
[](https://huggingface.co/pcuenq)
[Pedro Cuenca pcuenq Follow](https://huggingface.co/pcuenq)
* [Available Checkpoints](https://huggingface.co/blog/diffusers-coreml#available-checkpoints "Available Checkpoints")
* [Notes on Performance](https://huggingface.co/blog/diffusers-coreml#notes-on-performance "Notes on Performance")
* [Core ML Inference in Python](https://huggingface.co/blog/diffusers-coreml#core-ml-inference-in-python "Core ML Inference in Python")
* [Prerequisites](https://huggingface.co/blog/diffusers-coreml#prerequisites "Prerequisites")
* [Download the Model Checkpoints](https://huggingface.co/blog/diffusers-coreml#download-the-model-checkpoints "Download the Model Checkpoints")
* [Inference](https://huggingface.co/blog/diffusers-coreml#inference "Inference")
* [Core ML inference in Swift](https://huggingface.co/blog/diffusers-coreml#core-ml-inference-in-swift "Core ML inference in Swift")
* [Download](https://huggingface.co/blog/diffusers-coreml#download "Download")
* [Inference](https://huggingface.co/blog/diffusers-coreml#inference-1 "Inference")
* [Bring Your own Model](https://huggingface.co/blog/diffusers-coreml#bring-your-own-model "Bring Your own Model")
* [Next Steps](https://huggingface.co/blog/diffusers-coreml#next-steps "Next Steps")
Thanks to Apple engineers, you can now run Stable Diffusion on Apple Silicon using Core ML!
[This Apple repo](https://github.com/apple/ml-stable-diffusion) provides conversion scripts and inference code based on [🧨 Diffusers](https://github.com/huggingface/diffusers), and we love it! To make it as easy as possible for you, we converted the weights ourselves and put the Core ML versions of the models in [the Hugging Face Hub](https://hf.co/apple).
**Update**: some weeks after this post was written we created a
DeepCamp AI