/sd-multi

Run multiple forks of Stable Diffusion

Primary LanguagePythonThe UnlicenseUnlicense

sd-multi - run multiple Stable Diffusion systems in Docker

Systems and Screenshots 👇

Purpose

I've noticed that some forks of Stable Diffusion, while very active, often break. This repo adds a little bit of stability and predictability, while at the same time allowing the freedom to (relatively easily) play around with different forks/frontends/systems and their features.

Docker is used to provide some isolation between various systems' dependencies beyond what Anaconda can do. It also consolidates input and output locations.

Usage

For a detailed description of how to get this working in Windows using WSL2 and native Docker (not Docker Desktop), see this blog post.

Prerequisites

Steps

  1. Clone this repo to, say, your home directory, and then cd into it:
cd ~
git clone https://github.com/arktronic/sd-multi.git
cd sd-multi
  1. If not using a Hugging Face token, place the sd-v1-4.ckpt and/or v1-5-pruned-emaonly.ckpt file you downloaded earlier into ~/sd-multi/res/
  2. If you do have a Hugging Face token, copy env.example to .env inside ~/sd-multi and edit the .env file:
    • Uncomment the #HUGGINGFACE_TOKEN= line by removing the # in front
    • Insert your Hugging Face token after the equals sign, like so: HUGGINGFACE_TOKEN=hf_asdfasdfasdfasdfasdf
  3. Run ./verify-resources.sh -d to verify and download any missing models or weights
    • If you encounter any issues, please make sure they are resolved before continuing to the next step
  4. Launch one of the supported forks! (see the fork options below)

All the resources (models and weights) are in ~/sd-multi/res/ and all the output files generated by Stable Diffusion are in ~/sd-multi/output/.

System options


amotile (stable-diffusion-studio), an animation-focused frontend

Launch:

./run-amotile.sh

image

(Felis catus wasn't behaving well for these transitions, sorry.)


AUTOMATIC1111, one of the most active forks with lots of features and scripts

Launch:

./run-automatic1111.sh

image


InvokeAI (a.k.a. lstein), an early but well-maintained fork (web mode - beautiful interface!)

Launch:

./run-invokeai-web.sh

image


InvokeAI (a.k.a. lstein), an early but well-maintained fork (CLI mode)

Launch:

./run-invokeai-cli.sh

image


lama-cleaner, an inpainting/cleaning tool that supports SD and many other models

Launch:

./run-lama.sh

image


osi1880vr (deforum-sd-ui), a Deforum-based animation/video web UI fork

Launch:

./run-osi1880vr.sh

image


Sygil (a.k.a. hlky, sd-webui), an established, easy to use fork (gradio mode)

Launch:

./run-sygil-gradio.sh

image


Sygil (a.k.a. hlky, sd-webui), an established, easy to use fork (streamlit mode)

Launch:

./run-sygil-streamlit.sh

image


Contributing

If you have any ideas for improvements, suggestions of additional forks to add, or anything else, please create an issue and/or open a PR.

(Maybe there's a cool new fork found in here or elsewhere?)