From 87a51e9fd14f267fbb7ba49b67ca3c7340f47757 Mon Sep 17 00:00:00 2001 From: AbdBarho Date: Sun, 4 Dec 2022 11:00:28 +0100 Subject: [PATCH] [BREAKING] Rename UIs (#254) Rename the UIs in docker compose to their new names Changes folder names Changes output folder structure Closes issue #263 Adds `sygil-sl` instead of docker compose flag. --- .devscripts/chmod.sh | 1 + .devscripts/migratev3tov4.sh | 9 +++ .github/ISSUE_TEMPLATE/bug.md | 28 ++++----- .github/workflows/docker.yml | 5 +- .github/workflows/xformers.yml | 36 ----------- LICENSE | 13 ---- README.md | 59 +++++-------------- docker-compose.yml | 24 +++++--- services/AUTOMATIC1111/config.json | 8 +-- services/AUTOMATIC1111/entrypoint.sh | 2 - services/{lstein => invoke}/Dockerfile | 5 +- services/{lstein => invoke}/entrypoint.sh | 2 + services/{lstein => invoke}/info.py | 0 services/{lstein => invoke}/models.yaml | 0 services/{hlky => sygil}/Dockerfile | 0 services/{hlky => sygil}/info.py | 0 services/{hlky => sygil}/mount.sh | 0 services/{hlky => sygil}/run.sh | 0 .../{hlky => sygil}/userconfig_streamlit.yaml | 5 +- 19 files changed, 66 insertions(+), 131 deletions(-) create mode 100755 .devscripts/migratev3tov4.sh delete mode 100644 .github/workflows/xformers.yml rename services/{lstein => invoke}/Dockerfile (95%) rename services/{lstein => invoke}/entrypoint.sh (96%) rename services/{lstein => invoke}/info.py (100%) rename services/{lstein => invoke}/models.yaml (100%) rename services/{hlky => sygil}/Dockerfile (100%) rename services/{hlky => sygil}/info.py (100%) rename services/{hlky => sygil}/mount.sh (100%) rename services/{hlky => sygil}/run.sh (100%) rename services/{hlky => sygil}/userconfig_streamlit.yaml (59%) diff --git a/.devscripts/chmod.sh b/.devscripts/chmod.sh index d925b42..3cbbe66 100755 --- a/.devscripts/chmod.sh +++ b/.devscripts/chmod.sh @@ -3,3 +3,4 @@ set -Eeuo pipefail find services -name "*.sh" -exec git update-index --chmod=+x {} \; +find .devscripts -name "*.sh" -exec git update-index --chmod=+x {} \; diff --git a/.devscripts/migratev3tov4.sh b/.devscripts/migratev3tov4.sh new file mode 100755 index 0000000..bbe0b29 --- /dev/null +++ b/.devscripts/migratev3tov4.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -Eeuo pipefail + +echo "Moving everything in output to output/old..." +mv output old +mkdir output +mv old/.gitignore output +mv old output diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 96c206c..2c2c54f 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -1,10 +1,9 @@ --- name: Bug about: Report a bug -title: '' +title: "" labels: bug -assignees: '' - +assignees: "" --- @@ -14,28 +13,27 @@ assignees: '' - [ ] It is not in the [FAQ](https://github.com/AbdBarho/stable-diffusion-webui-docker/wiki/FAQ), I checked. - [ ] It is not in the [issues](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues?q=), I searched. - **Describe the bug** - **Which UI** -hlky or auto or auto-cpu or lstein? - +auto or auto-cpu or invoke or sygil? **Hardware / Software** - - OS: [e.g. Windows 10 / Ubuntu ] - - OS version: - - WSL version (if applicable): - - Docker Version: - - Docker compose version: - - Repo version: - - RAM: - - GPU/VRAM: + +- OS: [e.g. Windows 10 / Ubuntu 22.04] +- OS version: +- WSL version (if applicable): +- Docker Version: +- Docker compose version: +- Repo version: +- RAM: +- GPU/VRAM: **Steps to Reproduce** + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9643132..2c7645e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -14,12 +14,11 @@ jobs: matrix: profile: - auto - - hlky - - lstein + - sygil + - invoke - download runs-on: ubuntu-latest name: ${{ matrix.profile }} steps: - uses: actions/checkout@v3 - # better caching? - run: docker compose --profile ${{ matrix.profile }} build --progress plain diff --git a/.github/workflows/xformers.yml b/.github/workflows/xformers.yml deleted file mode 100644 index 1abc38f..0000000 --- a/.github/workflows/xformers.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build Xformers - -on: - workflow_dispatch: {} - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 180 - container: - image: python:3.10-slim - env: - DEBIAN_FRONTEND: noninteractive - XFORMERS_DISABLE_FLASH_ATTN: 1 - FORCE_CUDA: 1 - TORCH_CUDA_ARCH_LIST: "6.0;6.1;6.2;7.0;7.2;7.5;8.0;8.6" - NVCC_FLAGS: --use_fast_math -DXFORMERS_MEM_EFF_ATTENTION_DISABLE_BACKWARD - MAX_JOBS: 4 - steps: - - run: | - apt-get update - apt-get install gpg wget git -y - wget https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.0-1_all.deb - dpkg -i cuda-keyring_1.0-1_all.deb - apt-get update - apt-get install cuda-nvcc-11-8 cuda-libraries-dev-11-8 -y - - export PIP_CACHE_DIR=$(pwd)/cache - pip install ninja install torch --extra-index-url https://download.pytorch.org/whl/cu113 - - pip wheel --wheel-dir=data git+https://github.com/facebookresearch/xformers.git@3633e1afc7bffbe61957f04e7bb1a742ee910ace#egg=xformers - - name: Artifacts - uses: actions/upload-artifact@v3 - with: - name: xformers - path: data/xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl diff --git a/LICENSE b/LICENSE index 3599d2b..449bf15 100644 --- a/LICENSE +++ b/LICENSE @@ -87,16 +87,3 @@ processes, such as predicting an individual will commit fraud/crime commitment (e.g. by text profiling, drawing causal relationships between assertions made in documents, indiscriminate and arbitrarily-targeted use). - - - -By using this software, you also agree to the following licenses: -https://github.com/CompVis/stable-diffusion/blob/main/LICENSE -https://github.com/sd-webui/stable-diffusion-webui/blob/master/LICENSE -https://github.com/invoke-ai/InvokeAI/blob/main/LICENSE -https://github.com/cszn/BSRGAN/blob/main/LICENSE -https://github.com/sczhou/CodeFormer/blob/master/LICENSE -https://github.com/TencentARC/GFPGAN/blob/master/LICENSE -https://github.com/xinntao/Real-ESRGAN/blob/master/LICENSE -https://github.com/xinntao/ESRGAN/blob/master/LICENSE -https://github.com/cszn/SCUNet/blob/main/LICENSE diff --git a/README.md b/README.md index b441c72..eacb01d 100644 --- a/README.md +++ b/README.md @@ -2,68 +2,41 @@ Run Stable Diffusion on your machine with a nice UI without any hassle! - ## Setup & Usage Visit the wiki for [Setup](https://github.com/AbdBarho/stable-diffusion-webui-docker/wiki/Setup) and [Usage](https://github.com/AbdBarho/stable-diffusion-webui-docker/wiki/Usage) instructions, checkout the [FAQ](https://github.com/AbdBarho/stable-diffusion-webui-docker/wiki/FAQ) page if you face any problems, or create a new issue! - -## Contributing - -Contributions are welcome! **Create a discussion first of what the problem is and what you want to contribute (before you implement anything)** ## Features This repository provides multiple UIs for you to play around with stable diffusion: -### AUTOMATIC1111 +### [AUTOMATIC1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui) -[AUTOMATIC1111's fork](https://github.com/AUTOMATIC1111/stable-diffusion-webui) is imho the most feature rich yet elegant UI: - -- Text to image, with many samplers and even negative prompts! -- Image to image, with masking, cropping, in-painting, out-painting, variations. -- GFPGAN, RealESRGAN, LDSR, CodeFormer. -- Loopback, prompt weighting, prompt matrix, X/Y plot -- Live preview of the generated images. -- Highly optimized 4GB GPU support, or even CPU only! -- Textual inversion allows you to use pretrained textual inversion embeddings -- [Full feature list here](https://github.com/AUTOMATIC1111/stable-diffusion-webui-feature-showcase) +[Full feature list here](https://github.com/AUTOMATIC1111/stable-diffusion-webui-feature-showcase), Screenshots: | Text to image | Image to image | Extras | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | ![](https://user-images.githubusercontent.com/24505302/189541954-46afd772-d0c8-4005-874c-e2eca40c02f2.jpg) | ![](https://user-images.githubusercontent.com/24505302/189541956-5b528de7-1b5d-479f-a1db-d3f5a53afc59.jpg) | ![](https://user-images.githubusercontent.com/24505302/189541957-cf78b352-a071-486d-8889-f26952779a61.jpg) | -### hlky (sd-webui / sygil-webui) +### [InvokeAI (lstein)](https://github.com/invoke-ai/InvokeAI) + +[Full feature list here](https://github.com/invoke-ai/InvokeAI#features), Screenshots: -[hlky's fork](https://github.com/Sygil-Dev/sygil-webui) is one of the most popular UIs, with many features: +| Text to image | Image to image | Extras | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| ![](https://user-images.githubusercontent.com/24505302/195158552-39f58cb6-cfcc-4141-9995-a626e3760752.jpg) | ![](https://user-images.githubusercontent.com/24505302/195158553-152a0ab8-c0fd-4087-b121-4823bcd8d6b5.jpg) | ![](https://user-images.githubusercontent.com/24505302/195158548-e118206e-c519-4915-85d6-4c248eb10fc0.jpg) | -- Text to image, with many samplers -- Image to image, with masking, cropping, in-painting, variations. -- GFPGAN, RealESRGAN, LDSR, GoBig, GoLatent -- Loopback, prompt weighting -- 6GB or even 4GB GPU support! -- [Full feature list here](https://github.com/Sygil-Dev/sygil-webui/blob/master/README.md) +### [Sygil (sd-webui / hlky)](https://github.com/Sygil-Dev/sygil-webui) -Screenshots: +[Full feature list here](https://github.com/Sygil-Dev/sygil-webui/blob/master/README.md), Screenshots: | Text to image | Image to image | Image Lab | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | ![](https://user-images.githubusercontent.com/24505302/189541298-f902b021-a1eb-4e4b-b2eb-b6a696a8ec80.jpg) | ![](https://user-images.githubusercontent.com/24505302/189541295-7d7f2162-2189-4e0a-abbd-703f4779e1cd.jpg) | ![](https://user-images.githubusercontent.com/24505302/189541294-aa7f7735-a973-4e17-ada0-1fe3acbb1772.jpg) | +## Contributing - -### lstein (InvokeAI) - -[lstein's fork](https://github.com/invoke-ai/InvokeAI) is one of the earliest with a wonderful WebUI. -- Text to image, with many samplers -- Image to image -- 4GB GPU support -- More coming! -- [Full feature list here](https://github.com/invoke-ai/InvokeAI#features) - -| Text to image | Image to image | Extras | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| ![](https://user-images.githubusercontent.com/24505302/195158552-39f58cb6-cfcc-4141-9995-a626e3760752.jpg) | ![](https://user-images.githubusercontent.com/24505302/195158553-152a0ab8-c0fd-4087-b121-4823bcd8d6b5.jpg) | ![](https://user-images.githubusercontent.com/24505302/195158548-e118206e-c519-4915-85d6-4c248eb10fc0.jpg) | - +Contributions are welcome! **Create a discussion first of what the problem is and what you want to contribute (before you implement anything)** ## Disclaimer @@ -75,10 +48,8 @@ This license of this software forbids you from sharing any content that violates Special thanks to everyone behind these awesome projects, without them, none of this would have been possible: -- [hlky/stable-diffusion-webui](https://github.com/hlky/stable-diffusion-webui) - [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) -- [lstein/stable-diffusion](https://github.com/lstein/stable-diffusion) +- [InvokeAI](https://github.com/invoke-ai/InvokeAI) +- [Sygil-webui](https://github.com/Sygil-Dev/sygil-webui) - [CompVis/stable-diffusion](https://github.com/CompVis/stable-diffusion) -- [hlky/sd-enable-textual-inversion](https://github.com/hlky/sd-enable-textual-inversion) -- [devilismyfriend/latent-diffusion](https://github.com/devilismyfriend/latent-diffusion) -- [Hafiidz/latent-diffusion](https://github.com/Hafiidz/latent-diffusion) +- and many many more. diff --git a/docker-compose.yml b/docker-compose.yml index 78e86a7..8b7ba32 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,7 @@ services: <<: *base_service profiles: ["auto"] build: ./services/AUTOMATIC1111 - image: sd-auto:19 + image: sd-auto:20 environment: - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access @@ -38,20 +38,26 @@ services: environment: - CLI_ARGS=--no-half --precision full - hlky: + sygil: &sygil <<: *base_service - profiles: ["hlky"] - build: ./services/hlky/ - image: sd-hlky:11 + profiles: ["sygil"] + build: ./services/sygil/ + image: sd-sygil:12 environment: - CLI_ARGS=--optimized-turbo - USE_STREAMLIT=0 - lstein: + sygil-sl: + <<: *sygil + environment: + - USE_STREAMLIT=1 + + + invoke: <<: *base_service - profiles: ["lstein"] - build: ./services/lstein/ - image: sd-lstein:9 + profiles: ["invoke"] + build: ./services/invoke/ + image: sd-invoke:10 environment: - PRELOAD=true - CLI_ARGS= diff --git a/services/AUTOMATIC1111/config.json b/services/AUTOMATIC1111/config.json index 6f70386..7fff2b7 100644 --- a/services/AUTOMATIC1111/config.json +++ b/services/AUTOMATIC1111/config.json @@ -1,8 +1,8 @@ { - "outdir_samples": "/output", - "outdir_txt2img_samples": "/output/txt2img-images", - "outdir_img2img_samples": "/output/img2img-images", - "outdir_extras_samples": "/output/extras-images", + "outdir_samples": "", + "outdir_txt2img_samples": "/output/txt2img", + "outdir_img2img_samples": "/output/img2img", + "outdir_extras_samples": "/output/extras", "outdir_txt2img_grids": "/output/txt2img-grids", "outdir_img2img_grids": "/output/img2img-grids", "outdir_save": "/output/saved", diff --git a/services/AUTOMATIC1111/entrypoint.sh b/services/AUTOMATIC1111/entrypoint.sh index c3e2594..acaaef3 100755 --- a/services/AUTOMATIC1111/entrypoint.sh +++ b/services/AUTOMATIC1111/entrypoint.sh @@ -52,8 +52,6 @@ for to_path in "${!MOUNTS[@]}"; do echo Mounted $(basename "${from_path}") done -mkdir -p /output/saved /output/txt2img-images/ /output/img2img-images /output/extras-images/ /output/grids/ /output/txt2img-grids/ /output/img2img-grids/ - if [ -f "/data/config/auto/startup.sh" ]; then pushd ${ROOT} . /data/config/auto/startup.sh diff --git a/services/lstein/Dockerfile b/services/invoke/Dockerfile similarity index 95% rename from services/lstein/Dockerfile rename to services/invoke/Dockerfile index 457c551..89a3a32 100644 --- a/services/lstein/Dockerfile +++ b/services/invoke/Dockerfile @@ -32,7 +32,7 @@ cd /usr/lib/x86_64-linux-gnu/pkgconfig/ ln -sf opencv4.pc opencv.pc EOF -ARG BRANCH=main SHA=5c31feb3a1096d437c94b6e1c3224eb7a7224a85 +ARG BRANCH=main SHA=38cd968130e386d188bdef68f9fbfbbbfabb2da0 RUN <