This is Stable Diffusion CoreML version, working on Mac M series processors with Flask API
The original implementation of CoreML Stable Diffusion by Apple
·
Report Bug
·
Request Feature
Table of Contents
First you need to download a model with download_model.py
python3 download_model.py
If you choose non-default model - make sure that model_version, repo_id and mlpackages_dir match between download_model.py and flask_api.py More on models in the original docs
-
Clone the repo
git clone https://github.com/dvorson/mac_m1_coreml_stable_diffusion_flask_api.git
-
Create virtual env
python3 -m venv /path/to/new/virtual/environment
-
Install python packages
pip3 install -r requirements.txt
When a server is up, send a POST request to localhost:3000/app/inference with the prompt payload:
{
"prompt": "a painting of a spaceship by basquiat, intricate detail"
}