فهرست منبع

[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.
AbdBarho 3 سال پیش
والد
کامیت
87a51e9fd1

+ 1 - 0
.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 {} \;

+ 9 - 0
.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

+ 13 - 15
.github/ISSUE_TEMPLATE/bug.md

@@ -1,10 +1,9 @@
 ---
 name: Bug
 about: Report a bug
-title: ''
+title: ""
 labels: bug
-assignees: ''
-
+assignees: ""
 ---
 
 <!--  PLEASE FILL THIS OUT, IT WILL MAKE BOTH OF OUR LIVES EASIER -->
@@ -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**
 
 <!--  tried to run the app, my cat exploded -->
 
-
 **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: <!--  on windows, use the command `winver` to find out, on ubuntu `lsb_release -d`  -->
- - WSL version (if applicable): <!-- get using `wsl -l -v` -->
- - Docker Version: <!--  get using `docker version` -->
- - Docker compose version: <!--  get using `docker compose version` -->
- - Repo version: <!-- tag, commit sha, or "from master" -->
- - RAM:
- - GPU/VRAM:
+
+- OS: [e.g. Windows 10 / Ubuntu 22.04]
+- OS version: <!--  on windows, use the command `winver` to find out, on ubuntu `lsb_release -d`  -->
+- WSL version (if applicable): <!-- get using `wsl -l -v` -->
+- Docker Version: <!--  get using `docker version` -->
+- Docker compose version: <!--  get using `docker compose version` -->
+- Repo version: <!-- tag, commit sha, or "from master" -->
+- RAM:
+- GPU/VRAM:
 
 **Steps to Reproduce**
+
 1. Go to '...'
 2. Click on '....'
 3. Scroll down to '....'

+ 2 - 3
.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

+ 0 - 36
.github/workflows/xformers.yml

@@ -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

+ 0 - 13
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

+ 15 - 44
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.

+ 15 - 9
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=

+ 4 - 4
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",

+ 0 - 2
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

+ 2 - 3
services/lstein/Dockerfile → 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 <<EOF
 git fetch
 git reset --hard
@@ -54,6 +54,5 @@ EOF
 ENV ROOT=/stable-diffusion PYTHONPATH="${PYTHONPATH}:${ROOT}" PRELOAD=false CLI_ARGS=""
 EXPOSE 7860
 
-
 ENTRYPOINT ["/docker/entrypoint.sh"]
-CMD python3 -u scripts/invoke.py --web --host 0.0.0.0 --port 7860 --config /docker/models.yaml --root_dir ${ROOT} --outdir /output ${CLI_ARGS}
+CMD python3 -u scripts/invoke.py --web --host 0.0.0.0 --port 7860 --config /docker/models.yaml --root_dir ${ROOT} --outdir /output/invoke ${CLI_ARGS}

+ 2 - 0
services/lstein/entrypoint.sh → services/invoke/entrypoint.sh

@@ -20,6 +20,8 @@ MOUNTS["${ROOT}/models/openai/clip-vit-large-patch14"]=/data/.cache/huggingface/
 MOUNTS["${ROOT}/models/CompVis/stable-diffusion-safety-checker"]=/data/.cache/huggingface/transformers/
 
 
+MOUNTS["${ROOT}/embeddings"]=/data/embeddings/
+
 # hacks
 MOUNTS["${ROOT}/models/clipseg"]=/data/.cache/invoke/clipseg/
 

+ 0 - 0
services/lstein/info.py → services/invoke/info.py


+ 0 - 0
services/lstein/models.yaml → services/invoke/models.yaml


+ 0 - 0
services/hlky/Dockerfile → services/sygil/Dockerfile


+ 0 - 0
services/hlky/info.py → services/sygil/info.py


+ 0 - 0
services/hlky/mount.sh → services/sygil/mount.sh


+ 0 - 0
services/hlky/run.sh → services/sygil/run.sh


+ 3 - 2
services/hlky/userconfig_streamlit.yaml → services/sygil/userconfig_streamlit.yaml

@@ -1,10 +1,11 @@
+# https://github.com/Sygil-Dev/sygil-webui/blob/master/configs/webui/webui_streamlit.yaml
 general:
   version: 1.24.6
   outdir: /output
   default_model: "Stable Diffusion v1.5"
   default_model_path: /data/StableDiffusion/v1-5-pruned-emaonly.ckpt
-  outdir_txt2img: /output/txt2img-samples
-  outdir_img2img: /output/img2img-samples
+  outdir_txt2img: /output/txt2img
+  outdir_img2img: /output/img2img
   outdir_img2txt: /output/img2txt
   optimized: True
   optimized_turbo: True