Git Product home page Git Product logo

stable-diffusion-webui-mps_venv's Introduction

stable-diffusion-webui-mps_venv

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.

Pics

Screenshot

Features

  • Installs and Runs Automatic1111's Stable Diffusion WebUI with using venv on your macOS
  • MPS Support with Pytorch 1.13 stable

Tested hardware

  • MacBook Pro '13 2020, Apple M1 16GB RAM

How's the iteration speed?

  • 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.

System Requirement

  • macOS 12.3 or later
  • Apple Silicon Macs

Requirement

Other requirements (cmake protobuf rust python etc...) will be installed automatically while runnning the script.

Installation

# 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.

Usage

# 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

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 from 1.13.0.dev20220922 (Nightly) to 1.13.0 (stable)
  • To reduce RAM usage and increase system stability, I've added --medvram instead of opt-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

Known issues

  • Some samplers don't work with using MPS. For example "Eular a".
  • Stable Diffusion 2.0 models will not work.

Credits

License

This repository is under MIT license.

stable-diffusion-webui-mps_venv's People

Contributors

spinningsamurai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.