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

intermediate Published 1 Dec 2022
Action Steps
  1. Download the pre-converted Core ML models from Hugging Face Hub
  2. Use the Core ML inference code in Python or Swift to run the models
  3. 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

[![Image 1: Hugging Face's logo](https://huggingface.co/front/assets/huggingface_logo-noborder.svg)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)
* [![Image 2](https://cdn-avatars.huggingface.co/v1/production/uploads/6032802e1f993496bc14d9e3/w6hr-DEQot4VVkoyRIBiy.png)](https://huggingface.co/osanseviero "osanseviero")
* [![Image 3](https://cdn-avatars.huggingface.co/v1/production/uploads/1636474144020-noauth.jpeg)](https://huggingface.co/WildGenie "WildGenie")
* [![Image 4](https://cdn-avatars.huggingface.co/v1/production/uploads/64319ed9034ecbefddd4f46f/PnglqSRCJFT7xM1pP3XnO.png)](https://huggingface.co/gheorgheiuga "gheorgheiuga")
* [![Image 5](https://cdn-avatars.huggingface.co/v1/production/uploads/64bc3d865b8d826146b8d26a/w_wKsYRSvg0EB1IgoEYRy.jpeg)](https://huggingface.co/instablejay "instablejay")
* [![Image 6](https://huggingface.co/avatars/b36027822d6b00831eb9c232031194f0.svg)](https://huggingface.co/Jarrodbarnes "Jarrodbarnes")
* [![Image 7](https://huggingface.co/avatars/8ce1bae68d69d9247d2c8891f7826ace.svg)](https://huggingface.co/relfa "relfa")
* +2

[![Image 8: Pedro Cuenca's avatar](https://cdn-avatars.huggingface.co/v1/production/uploads/1617264212503-603d25b75f9d390ab190b777.jpeg)](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
Read full article → ← Back to Reads

Related Videos

5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
What is RAG? (the fix for AI making things up) #RAG #AIexplained #LLM #ChatGPT #AIforBusiness
What is RAG? (the fix for AI making things up) #RAG #AIexplained #LLM #ChatGPT #AIforBusiness
__beginnerscode__
OpenAI's GPT-5.6 Sol: millions want it, 20 can use it #AInews #OpenAI #GPT56 #ChatGPT #AIsecurity
OpenAI's GPT-5.6 Sol: millions want it, 20 can use it #AInews #OpenAI #GPT56 #ChatGPT #AIsecurity
__beginnerscode__
Proprietary vs open-weight AI: What’s the difference? | Artificial Intelligence
Proprietary vs open-weight AI: What’s the difference? | Artificial Intelligence
Business Standard
Google Omni Masterclass FREE: Generate Unlimited Realistic Videos under 20 Mins 🔥
Google Omni Masterclass FREE: Generate Unlimited Realistic Videos under 20 Mins 🔥
Damini Tripathi
Claude AI For Marketers: Save 20+ Hours/Week with these Methods 🔥
Claude AI For Marketers: Save 20+ Hours/Week with these Methods 🔥
Damini Tripathi