TroubleChute Logo
STABLE DIFFUSION

Install Stable Diffusion on Mac - Full Guide


Published: Jan 27, 2023
Last Edit: Jun 8, 2023
AI Stable Diffusion Mac
682 Words, 3 Minutes.

Watch the video:


Timestamps:
0:00 - Explanation, and details
0:35 - Install Homebrew
1:28 - Downloading AUTOMATIC1111's Stable Diffusion WebUI
1:54 - Downloading Stable Diffusion models
3:28 - Starting A1's SDUI on Mac
5:00 - Using Stable Diffusion on a Mac
5:40 - Drawbacks of SD on Mac
5:50 - Launch arguments & Less VRAM
7:35 - Opening SDUI in the future
8:20 - Is Mac good for SDUI? Not really...

Stable Diffusion on a Mac?

Well, it’ll be slow… But with a more powerful mac setup, this is something you’d want to consider doing, especially if you don’t have access to a PC, or even one as powerful as the mac or Macbook you have.

By the end you should hopefully be generating images happily!

Notes

Some features like the CLIP interrogator and training/Dreambooth may not work, or work properly. This is experimental, somewhat.

This article is based off the Discussion on the AUTOMATIC1111’s Stable Diffusion Discussions page - In this thread, posted by @brkirch.

Installing

1. Brew

You will need the package manager Brew (https://brew.sh/) to get started. Download and install it by running the command:

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

2. Required packages

Install the required packages by running the following command (all of these should be run in the same terminal window).

The second command will download the Stable Diffusion GitHub repo.

The third command takes us into the correct directory, and the final one opens the folder in Finder. We’ll need this in the next step.

1
2
3
4
brew install cmake protobuf rust [email protected] git wget
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui
open .

3. Downloading some Stable Diffusion models

Now, something for Stable Diffusion to work with.

We can download and place any Stable Diffusion model in the ./models folder. So, go ahead and do that now. For example, the Stable Diffusion 1.5 model from HuggingFace. Click the Files and versions tab, and then next to v1-5-pruned.ckpt click the small arrow (should be just beside the file size in the same row).

Then, just drag the ckpt or safetensors file into the stable-diffusion-webui/models folder. Your finder should be open from the previous step.

Other downloads include (but are not limited to):

You can also dive into SD 2.0+. Just make sure to use a width and height of 768px and above, and you will also need to download a configuration file from the links too!

4. Installing AUTOMATIC1111’s Stable Diffusion

Simply run the command ./webui.sh.

If you closed the terminal, open the same folder (assuming you didn’t navigate anywhere before starting this guide) by running cd ~/stable-diffusion-webui first.

Otherwise, for future reference, just remember to run ~/stable-diffusion-webui/webui.sh to open it from a terminal anywhere.

This will then download and set up the required packages. Get some coffee ready as you may be waiting a while. It’s usually not so bad.

5. Updating AUTOMATIC1111’s Stable Diffusion

To update, run git pull in the ~/stable-diffusion-webui folder.

The repo doesn’t automatically update, but there are tons of commits (updates) pushed every day (usually). Just make sure to update it once in a while for better performance and the latest features.

Sometimes it may require things to update on the next open, so do keep in mind that things may require a download after pulling a new update.

6. Better performance and customization

Your system may not be cut out to run SDUI to it’s best ability… That’s alright. We can tweak some options.

Just open ~/stable-diffusion-webui/webui-user.sh in a text editor. Then uncomment the line that starts with #COMMANDLINE_ARGS= by removing the hash, so it appears as COMMANDLINE_ARGS= instead.

Then, in the quotes just after, enter command line arguments to help tell the program what to do. For example:

--medvram or --lowvram.

Other options include: --opt-split-attention-v1, --skip-torch-cuda-test, --no-half, --use-cpu all. There are many options, each with their tradeoffs (usually time generating an image).

For further troubleshooting and updates to the guide, please see the Discussion this guide was based off.

TroubleChute © Wesley Pyburn (TroubleChute)
Support Me Privacy Policy Cookies Policy Terms of Service Change privacy settings Contact