How to Install Stable Diffusion on Mac

Stable Diffusion lets you generate AI images directly on your Mac without relying on cloud services. This guide walks you through installing the AUTOMATIC1111 web interface, the most popular way to run Stable Diffusion locally.
- Difficulty
- Intermediate
- Time
- 25 minutes
Step by step
Install Homebrew and Python
Open Terminal and install Homebrew by running `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`. After installation completes, run `brew install [email protected]` to install Python 3.10, which Stable Diffusion requires.
Note: Check your Python version with `python3 --version` to confirm you have 3.10 or later installed.Install Git and clone the repository
Run `brew install git` to install Git if you don't have it. Navigate to your desired installation directory in Terminal, then clone the AUTOMATIC1111 repository with `git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git`. This downloads all necessary files to run Stable Diffusion.
Note: Create a dedicated folder like `~/AI` to keep your AI tools organized and easy to find.Download a Stable Diffusion model
Navigate to the models folder with `cd stable-diffusion-webui/models/Stable-diffusion`. Download a model file from Hugging Face or CivitAI. For beginners, download the standard SD 1.5 model by running `wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors`.
Note: Model files are large (2-7GB). Use a wired internet connection and expect 10-30 minutes download time depending on your connection.Run the installation script
Navigate back to the main directory with `cd ../..` then run `./webui.sh`. This script automatically installs all Python dependencies, sets up the virtual environment, and starts the web interface. The first run takes 10-15 minutes as it downloads additional components.
Note: If you encounter permission errors, run `chmod +x webui.sh` first to make the script executable.Access the web interface
Once installation completes, the terminal displays a local URL like `http://127.0.0.1:7860`. Open this URL in your web browser to access the Stable Diffusion interface. You'll see text input fields for prompts and various generation settings.
Note: Bookmark this URL for quick access. The interface only works while the terminal process is running.Generate your first image
Type a descriptive prompt in the main text box, such as "a peaceful mountain landscape at sunset". Leave other settings at default and click "Generate". Your first image typically takes 30-60 seconds to generate, depending on your Mac's specifications.
Note: Start with simple prompts to test functionality before experimenting with complex descriptions or advanced settings.Configure for optimal performance
For better performance on Mac, add `--medvram` to the launch arguments by editing the `webui-user.sh` file and adding this flag to the `COMMANDLINE_ARGS` line. This reduces VRAM usage at the cost of slightly slower generation times.
Note: If you have an M1 or M2 Mac with plenty of RAM, you can skip the --medvram flag for faster generation speeds.