https://github.com/icedream/sd-multiverse
Stable Diffusion launched with an easy script.
https://github.com/icedream/sd-multiverse
Last synced: 5 months ago
JSON representation
Stable Diffusion launched with an easy script.
- Host: GitHub
- URL: https://github.com/icedream/sd-multiverse
- Owner: icedream
- Created: 2024-02-21T20:01:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-16T11:10:34.000Z (over 1 year ago)
- Last Synced: 2024-11-16T12:19:41.560Z (over 1 year ago)
- Language: Shell
- Size: 218 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stable Diffusion Multiverse
A private project of mine to try and find a common way to launch any version or
fork of Stable Diffusion and their web interfaces. All the steps are basically
trimmed down to switching into the app directory and running a single launch
script.
## Requirements
Since this script is made to be as quick and common of an entrypoint as possible
you only need basic tools. I recommend whatever version of them your operating
system's package manager serves you with.
- either **micromamba** or **curl**, **tar**, and **bzip2** (which will download micromamba for you)
Debian/Ubuntu: `apt install --no-install-recommends -y ca-certificates git tar bzip2 curl`
Also make sure to install any requirements needed by the python app you want to
run itself. That usually includes correct GPU drivers and some additional files
to generate anything with.
For **AMD** on **Ubuntu** you want to check out [Ubuntu native installation](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/native-install/ubuntu.html) for AMD ROCM.
You may just need these packages: `rocm-hip-libraries rocm-language-runtime`
## How to use
1. (optional:) Clone/download your own version or fork of SD-UI that you want to
use. You can skip this if you want to use one of the [tested apps](#tested-apps).
2. Clone this repository via `git clone https://github.com/icedream/sd-multiverse.git`.
You do *not* need to use `--recursive` if that's something you do by default.
3. Run `./run.sh ` in your terminal.
## Tested apps
This repository includes some git submodules that point to known to work
versions of stable-diffusion-ui. If you use the run script they will be
automatically checked out when you run the app for the first time and haven't
done so yet yourself.
You can tell `run.sh` to use these known app versions:
- for AUTOMATIC1111's stable-diffusion-webui: `./run.sh apps/AUTOMATIC1111/stable-diffusion-webui`
- for Illyasviel's stable-diffusion-webui-forge: `./run.sh apps/Illyasviel/stable-diffusion-webui-forge`
- for lshqqytiger's stable-diffusion-webui-directml: `./run.sh apps/lshqqytiger/stable-diffusion-webui-directml`
- for ComfyUI: `./run.sh apps/comfyanonymous/ComfyUI`
- for easydiffusion: `./run.sh apps/easydiffusion/easydiffusion`
**Note:** This will not work if you download this repository as an archive
instead. Supply your own copy in this case.
## What happens behind the scenes
1. `run.sh` checks whether the app you passed is a submodule of this repo. If
it is, it will automatically run a submodule checkout on it.
2. `run.sh` then invokes `scripts/setup-venv.sh` with the app path as the working directory.
3. `setup-venv.sh` does some basic sanity checks and then installs needed
native dependencies via micromamba. It will set up the environment in the
`install` directory, and each app gets its own isolated environment.
4. `setup-venv.sh` checks the `requirements.txt` of the app and modifies it
if needed to make better or any use of GPU features. That includes installing xformers or other versions of torch/torchvision.
5. `setup-venv.sh` also modifies the environment variables for the app, once
again to make sure it runs properly on your GPU.
6. `setup-env.sh` runs pip with the modified requirements to install them.
7. `setup-env.sh` runs your app.