Image Generation AI

Stable Diffusion Web UI Installation Guide (Mac)

What is Stable Diffusion?

Stable Diffusion is an open-source AI model capable of generating high-quality images from text. Leveraging machine learning technology, it has garnered significant attention in the image generation field. It is particularly noted for its high degree of customization and its ability to generate images based on user-defined prompts, making it a valuable tool for many creators and researchers.

This model can run locally, eliminating the need for an internet connection and making it suitable for privacy-conscious image generation. The Stable Diffusion web UI provides an intuitive, code-free interface.

Prerequisites

This article assumes the following Mac environment:

~> sw_vers
ProductName:       macOS
ProductVersion:    15.3
BuildVersion:      24D60

~> uname -m
arm64

1. Install Necessary Dependencies

Install Homebrew (if not already installed)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Python, Git, wget, cmake, protobuf, and Rust

brew install [email protected] git wget cmake protobuf rust

2. Configure to Use Python 3.10

export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
python3.10 --version  # Version check

3. Create and Navigate to the Installation Directory

mkdir -p ~/stable-diffusion-webui && cd ~/stable-diffusion-webui

4. Download Stable Diffusion web UI

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

5. Download the Web UI Execution Script

wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh
chmod +x webui.sh

6. Download the Stable Diffusion Model

To run Stable Diffusion, you need a .ckpt or .safetensors model file.

Models can be downloaded from Hugging Face.

Recommended Model:

Place the downloaded model file in the stable-diffusion-webui/models/Stable-diffusion/ directory.

mkdir -p stable-diffusion-webui/models/Stable-diffusion
mv /path/to/downloaded/model.ckpt stable-diffusion-webui/models/Stable-diffusion/

7. Start the Web UI

./webui.sh

8. Access the Web UI

Once the installation is complete, the Web UI will be accessible at http://127.0.0.1:7860.


Stable Diffusion Web UI

Reference Stable Diffusion Web UI Installation on Apple Silicon