Stable Diffusion

The Best Way to Run Stable Diffusion on Mac M1: Invoke AI

By

Yubin

Updated

As a Mac user, am I doomed not to be able to run Stable Diffusion as well as a Windows user would?

Fear not! Today we're going to talk about Invoke AI, a full-featured Stable Diffusion fork that has an excellent Mac M1 version.

There are 3 ways people normally recommend Mac users run Stable Diffusion locally:

  • AUTOMATIC1111's WebUI. The most popular UI for Stable Diffusion. It does have a Mac version, however, Mac users have reported a lot of problems getting it installed and slow generation speeds, because the software is not optimized to work on Mac.
  • DiffusionBee. A MacOS app with the simplest installation and a great user experience. Installing it is as simple as installing a regular Mac app. The downside is that does not have as many features as the other versions. Read our summary of DiffusionBee here.
  • InvokeAI. One of the earliest forks of the original CompVis Stable Diffusion repo. Features are being added quickly: it now has a great UI and passionate community.

We recommend using InvokeAI, because it is relatively easy to install, and has a robust feature set.

The official repo has instructions on getting started: https://github.com/invoke-ai/InvokeAI.

In this article, we'll show you step-by-step images and walk you common errors in the installation process.

Installing InvokeAI on Mac

Requirements

  • Apple computer with M1 chip preferred, Intel chip is OK if you have minimum 4GB of VRAM
  • At least 10 GB free disk space
  • macOS 12.3 Monterey or later

Installation

Installation is fairly simple, you only need to run a single script. Go to:

https://github.com/invoke-ai/InvokeAI/releases/tag/v2.1.3p1

Scroll down and download the file called "InvokeAI-mac.zip".

Unzip this file and you will see two files: "readme.txt" and "install.sh"

You will want to open your terminal to run the installation script (Command + Spacebar, then search for "terminal"):

New terminal window

In order to navigate the folder you just downloaded, you should type something like:

cd downloads/invokeai

If you have not used the Terminal before, "cd" just means change directory. It is a common command used to move around your file system in the Terminal. Change the path above if your invokeAI folder is not located in your downloads folder. To go back, type:

cd ..

When you are in the correct folder, type:

./install.sh

The download will start. You will see the message "***** Installing InvokeAI... *****" and you will see various packages being downloaded:

The total package size will be somewhere around 90MB.

What if I get a Python error at this step?

You might get any number of Python errors during this installation step!

You might've fiddled around too much with different Python installations on your Mac, and now everything is scrambled.

We recommend uninstalling and completely reinstalling Python.

Muhsin Fatih has an excellent, simple write-up on how to do this here:

https://gist.github.com/MuhsinFatih/ee0154199803babb449b5bb98d3475f7

That's the article! Also check out:

FREE RESOURCE
SDXL Prompt Magic

A handbook that helps you improve your SDXL results, fast. Includes:

  • Easy step-by-step instructions
  • My favorite SDXL ComfyUI workflow
  • Recommendations for SDXL models, LoRAs & upscalers
  • Realistic and stylized/anime prompt examples

4 thoughts on “The Best Way to Run Stable Diffusion on Mac M1: Invoke AI”

  1. After installing Invoke AI on my mac, I accidentally deleted the script in the “invoke.sh” application file! Could anyone copy and paste that script here if possible?
    Thanks in advance!

    Reply

Leave a Comment