From 110627415deb90d5141dd068afaca206d4bb6339 Mon Sep 17 00:00:00 2001 From: AbdBarho Date: Tue, 16 May 2023 18:58:52 +0200 Subject: [PATCH] Deprecate Sygil (#450) It has been a long and wonderful journey --- .github/workflows/docker.yml | 1 - README.md | 10 +----- docker-compose.yml | 15 --------- services/sygil/Dockerfile | 40 ------------------------ services/sygil/info.py | 13 -------- services/sygil/mount.sh | 32 ------------------- services/sygil/run.sh | 10 ------ services/sygil/userconfig_streamlit.yaml | 11 ------- 8 files changed, 1 insertion(+), 131 deletions(-) delete mode 100644 services/sygil/Dockerfile delete mode 100644 services/sygil/info.py delete mode 100755 services/sygil/mount.sh delete mode 100755 services/sygil/run.sh delete mode 100644 services/sygil/userconfig_streamlit.yaml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0955d691b..8bb5799bc 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -14,7 +14,6 @@ jobs: matrix: profile: - auto - - sygil - invoke - comfy - download diff --git a/README.md b/README.md index 78a173273..659d51067 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,6 @@ This repository provides multiple UIs for you to play around with stable diffusi | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | ![](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) | -### [Sygil (sd-webui / hlky)](https://github.com/Sygil-Dev/sygil-webui) - -[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) | - ### [ComfyUI](https://github.com/comfyanonymous/ComfyUI) [Full feature list here](https://github.com/comfyanonymous/ComfyUI#features), Screenshot: @@ -58,7 +50,7 @@ Special thanks to everyone behind these awesome projects, without them, none of - [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) - [InvokeAI](https://github.com/invoke-ai/InvokeAI) -- [Sygil-webui](https://github.com/Sygil-Dev/sygil-webui) - [ComfyUI](https://github.com/comfyanonymous/ComfyUI) - [CompVis/stable-diffusion](https://github.com/CompVis/stable-diffusion) +- [Sygil-webui](https://github.com/Sygil-Dev/sygil-webui) - and many many more. diff --git a/docker-compose.yml b/docker-compose.yml index 6053a3738..f7567eed5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,21 +55,6 @@ services: # - PRELOAD=true # - CLI_ARGS=--always_use_cpu - sygil: &sygil - <<: *base_service - profiles: ["sygil"] - build: ./services/sygil/ - image: sd-sygil:16 - environment: - - CLI_ARGS=--optimized-turbo - - USE_STREAMLIT=0 - - sygil-sl: - <<: *sygil - profiles: ["sygil-sl"] - environment: - - USE_STREAMLIT=1 - comfy: &comfy <<: *base_service profiles: ["comfy"] diff --git a/services/sygil/Dockerfile b/services/sygil/Dockerfile deleted file mode 100644 index 7ed2b5edb..000000000 --- a/services/sygil/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM python:3.8-slim - -ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 - -RUN --mount=type=cache,target=/root/.cache/pip pip install torch==1.13.0 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117 - -RUN apt-get update && apt install gcc libsndfile1 ffmpeg build-essential zip unzip git -y && apt-get clean - -RUN --mount=type=cache,target=/root/.cache/pip \ - git config --global http.postBuffer 1048576000 && \ - git clone https://github.com/Sygil-Dev/sygil-webui.git stable-diffusion && \ - cd stable-diffusion && \ - git reset --hard 5291437085bddd16d752f811b6552419a2044d12 && \ - pip install -r requirements.txt - - -ARG BRANCH=master SHA=571fb897edd58b714bb385dfaa1ad59aecef8bc7 -RUN --mount=type=cache,target=/root/.cache/pip \ - cd stable-diffusion && \ - git fetch && \ - git checkout ${BRANCH} && \ - git reset --hard ${SHA} && \ - pip install -r requirements.txt - -RUN --mount=type=cache,target=/root/.cache/pip pip install -U 'transformers>=4.24' - -# add info -COPY . /docker/ -RUN python /docker/info.py /stable-diffusion/frontend/frontend.py && \ - chmod +x /docker/mount.sh /docker/run.sh && \ - # streamlit \ - sed -i -- 's/8501/7860/g' /stable-diffusion/.streamlit/config.toml - -WORKDIR /stable-diffusion -ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility -ENV NVIDIA_VISIBLE_DEVICES=all -ENV PYTHONPATH="${PYTHONPATH}:${PWD}" STREAMLIT_SERVER_HEADLESS=true USE_STREAMLIT=0 CLI_ARGS="" -EXPOSE 7860 - -CMD /docker/mount.sh && /docker/run.sh diff --git a/services/sygil/info.py b/services/sygil/info.py deleted file mode 100644 index a8b418c03..000000000 --- a/services/sygil/info.py +++ /dev/null @@ -1,13 +0,0 @@ -import sys -from pathlib import Path - -file = Path(sys.argv[1]) -file.write_text( - file.read_text()\ - .replace('

For help and advanced usage guides,', """ -

- Created using stable-diffusion-webui-docker. -

-

For help and advanced usage guides, -""", 1) -) diff --git a/services/sygil/mount.sh b/services/sygil/mount.sh deleted file mode 100755 index cc0dc9dca..000000000 --- a/services/sygil/mount.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -set -Eeuo pipefail - -declare -A MOUNTS - -ROOT=/stable-diffusion/src - -# cache -MOUNTS["/root/.cache"]=/data/.cache -# ui specific -MOUNTS["${PWD}/models/realesrgan"]=/data/RealESRGAN -MOUNTS["${PWD}/models/ldsr"]=/data/LDSR -MOUNTS["${PWD}/models/custom"]=/data/StableDiffusion - -# hack -MOUNTS["${PWD}/models/gfpgan/GFPGANv1.3.pth"]=/data/GFPGAN/GFPGANv1.4.pth -MOUNTS["${PWD}/models/gfpgan/GFPGANv1.4.pth"]=/data/GFPGAN/GFPGANv1.4.pth -MOUNTS["${PWD}/gfpgan/weights"]=/data/.cache - - -for to_path in "${!MOUNTS[@]}"; do - set -Eeuo pipefail - from_path="${MOUNTS[${to_path}]}" - rm -rf "${to_path}" - mkdir -p "$(dirname "${to_path}")" - ln -sT "${from_path}" "${to_path}" - echo Mounted $(basename "${from_path}") -done - -# streamlit config -ln -sf /docker/userconfig_streamlit.yaml /stable-diffusion/configs/webui/userconfig_streamlit.yaml diff --git a/services/sygil/run.sh b/services/sygil/run.sh deleted file mode 100755 index 89f795992..000000000 --- a/services/sygil/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -Eeuo pipefail - -echo "USE_STREAMLIT = ${USE_STREAMLIT}" -if [ "${USE_STREAMLIT}" == "1" ]; then - python -u -m streamlit run scripts/webui_streamlit.py -else - python3 -u scripts/webui.py --outdir /output --ckpt /data/StableDiffusion/v1-5-pruned-emaonly.ckpt ${CLI_ARGS} -fi diff --git a/services/sygil/userconfig_streamlit.yaml b/services/sygil/userconfig_streamlit.yaml deleted file mode 100644 index 07a20afc7..000000000 --- a/services/sygil/userconfig_streamlit.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# 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 - outdir_img2img: /output/img2img - outdir_img2txt: /output/img2txt - optimized: True - optimized_turbo: True