How to install Stable Diffusion on Mac

This blog post just talk about how to install Stable Diffusion web UI  on Mac if you would like to run it locally.

  1. Install Homebrew if you have not installed it before by running the following command in terminal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. Open a new terminal window and run the following command to install some dependencies

brew install cmake protobuf rust python@3.10 git wget

3. Navigate to the folder where you want to put Stable Diffusion and clone the Stable Diffusion web UI repo

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui

4. Download Stable Diffusion models(files with ".ckpt" extension) from Hugging Face and put them in the folder stable-diffusion-webui/models/Stable-diffusion, here are some popular official Stable Diffusion models

5. Navigate to the folder stable-diffusion-webui in the terminal and run

./webui.sh

It will automatically download and install some dependencies, and you would see something like below

Loading weights [9e2c6ceff3] from ../stable-diffusion-webui/models/Stable-diffusion/f222.ckpt
Creating model from config: ../stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (InvokeAI).
Textual inversion embeddings loaded(0): 
Model loaded in 9.5s (load weights from disk: 2.0s, create model: 1.3s, apply weights to model: 3.1s, apply half(): 2.1s, move model to device: 0.6s, load textual inversion embeddings: 0.3s).
Running on local URL:  http://127.0.0.1:7860

6. Enter the url http://127.0.0.1:7860 in web browser and you are ready to go

Hope it helps,

Michael

DigitalOcean Referral Badge