Fading Coder

One Final Commit for the Last Sprint

Home > Tools > Content

Installing Stable Diffusion WebUI on macOSjson error: Syntax error

Tools 1

To achieve optimal performance when generating images, the host machine should be equipped with an Apple Silicon chip (M1 or later). While the application can run on systems with 8GB of unified memory, 16GB or higher is recommended to prevent out-of-memory errors during high-resolution rendering. Additionally, ensure at least 15GB of free disk space is available to accommodate the application dependencies, virtual environment, and model weights.

Installing the Package Manager

Homebrew serves as the de facto package manager for macOS, simplifying the installation of software and dependencies. Open the Terminal application and execute the installation script provided by the official Homebrew repository:

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

Once the process completes, verify the installation by checking the version:

brew --version

Setting Up the Runtime Environment

The default Python installlation included with macOS is often outdated. Stable Diffusion WebUI specifically requires Python 3.10.6 or newer. Alongside the correct Python version, several compilation tools and libraries are necessary for the PyTorch backend.

Run the following command to install all required dependencies:

# Update Homebrew registry and install core dependencies
brew update
brew install cmake protobuf rust python@3.10 git wget

Cloning the Application Repository

Retrieve the source code for the AUTOMATIC1111 Stable Diffusion WebUI interface. This repository contains the web server logic and necessary scripts for environment initialization.

# Clone the repository into the current directory
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

Configuring the Model Checkpoint

The WebUI requires a pre-trained model checkpoint to function. Download the Stable Diffusion version 1.5 weight file (e.g., v1-5-pruned-emaonly.ckpt) from a trusted source such as Hugging Face.

Navigate to the models subdirectory within the cloned project folder and place the downloaded .ckpt or .safetensors file into the following path:

stable-diffusion-webui/models/stable-diffusion/

Launching the Interface

Initialize the web server by executing the launch script. This command will automatically create a Python virtual environment, install remaining pip dependencies, and start the local web server.

cd stable-diffusion-webui
./webui.sh

After the initialization process finishes, the terminal will display a local URL (typical http://127.0.0.1:7860). Open this address in a web browser to access the generation interface.

Related Articles

Efficient Usage of HTTP Client in IntelliJ IDEA

IntelliJ IDEA incorporates a versatile HTTP client tool, enabling developres to interact with RESTful services and APIs effectively with in the editor. This functionality streamlines workflows, replac...

Installing CocoaPods on macOS Catalina (10.15) Using a User-Managed Ruby

System Ruby on macOS 10.15 frequently fails to build native gems required by CocoaPods (for example, ffi), leading to errors like: ERROR: Failed to build gem native extension checking for ffi.h... no...

Resolve PhpStorm "Interpreter is not specified or invalid" on WAMP (Windows)

Symptom PhpStorm displays: "Interpreter is not specified or invalid. Press ‘Fix’ to edit your project configuration." This occurs when the IDE cannot locate a valid PHP CLI executable or when the debu...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.