This script allows you to install or run Automatic1111's Stable Diffusion WebUI with using venv and pyenv on your macOS. So, you no need to install conda.
- Installs and Runs Automatic1111's Stable Diffusion WebUI with using venv on your macOS
- MPS Support with Pytorch 1.13 stable
- MacBook Pro '13 2020, Apple M1 16GB RAM
- In the case of Apple M1 (MacBook Pro '13 2020) with using MPS, will produce 2.86s/it at fastest.
- In the case of Apple M1 (MacBook Pro '13 2020) with using CPU, will produce 5.36s/it at fastest.
- macOS 12.3 or later
- Apple Silicon Macs
Other requirements (cmake protobuf rust python etc...) will be installed automatically while runnning the script.
# Install Xcode command line tools.
xcode-select --install
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install pyenv
brew install pyenv
# Download this repo.
git clone https://github.com/SpinningSamurai/stable-diffusion-webui-mps_venv
# Change directory
cd stable-diffusion-webui-mps_venv
# Install requirements
./webui.sh -i
If you face some permissions error about webui.sh
, try below.
# Give the file execute permissions
chmod +x ./webui.sh
# Try again
./webui.sh -i
After that, put your favorite model (.ckpt file) in right directly.
# Start WebUI
./webui.sh -s
# Install requirements
./webui.sh -i
# Clean up directory
./webui.sh -c
# Open source directory
./webui.sh -o
If you want to start WebUI with command line arguments, rewrite or add your favorites to line 241 in webui.sh
Note
I'm not original author of this script.
I downloaded the original one from github but its author and the repo seem to have disappeared. So I decided to upload my own modified one because he/she allowed redistribution in the script.
Here are the major changes from the original one.
- Changed
Pytorch
version from1.13.0.dev20220922 (Nightly)
to1.13.0 (stable)
- To reduce RAM usage and increase system stability, I've added
--medvram
instead ofopt-split-attention-v1
in command line arguments. - Some optimizations and bugfixes.
In the end, it led iteration about 2x faster than original one.
Feel free to ask me when you have a issue or pull request. :9
- Some samplers don't work with using MPS. For example "Eular a".
- Stable Diffusion 2.0 models will not work.
- Automatic1111's Stable Diffusion WebUI
- A Original author of this script. Thank you.
This repository is under MIT license.