From 710280c7ab7bb9e3c6955be9c86e9b65ef13cc91 Mon Sep 17 00:00:00 2001 From: AbdBarho Date: Fri, 7 Oct 2022 09:46:07 +0200 Subject: [PATCH] Update versions (#120) - auto: https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/2995107fa24cfd72b0a991e18271dcde148c2807 - More samplers - Textual inversion training - hlky: https://github.com/sd-webui/stable-diffusion-webui/commit/1a9c053cb7b6832695771db2555c0adc9b41e95f - Build times are SLOW - lstein: https://github.com/lstein/stable-diffusion/commit/4f247a3672474bd9c46060bab6087dbf9e2531f3 - Prepare for 2.0 release - very cool new UI! --- .gitignore | 2 -- services/AUTOMATIC1111/Dockerfile | 5 ++-- services/hlky/Dockerfile | 6 ++--- services/hlky/mount.sh | 13 +++++++---- services/lstein/Dockerfile | 22 ++++++++--------- services/lstein/info.py | 7 ++++-- services/lstein/mount.sh | 39 +++++++++++++++---------------- 7 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.gitignore b/.gitignore index c693ed3..f64b472 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ -/dev /.devcontainer -embeddings/* /docker-compose.override.yml diff --git a/services/AUTOMATIC1111/Dockerfile b/services/AUTOMATIC1111/Dockerfile index ef58e3d..6e5dad4 100644 --- a/services/AUTOMATIC1111/Dockerfile +++ b/services/AUTOMATIC1111/Dockerfile @@ -17,7 +17,7 @@ git reset --hard 24268930bf1dce879235a7fddd0b2355b84d7ea6 rm -rf repositories/taming-transformers/data repositories/taming-transformers/assets EOF -RUN git clone https://github.com/crowsonkb/k-diffusion.git repositories/k-diffusion && cd repositories/k-diffusion && git reset --hard 9e3002b7cd64df7870e08527b7664eb2f2f5f3f5 +RUN git clone https://github.com/crowsonkb/k-diffusion.git repositories/k-diffusion && cd repositories/k-diffusion && git reset --hard f4e99857772fc3a126ba886aadf795a332774878 FROM continuumio/miniconda3:4.12.0 @@ -49,7 +49,7 @@ RUN pip install --prefer-binary --no-cache-dir -r ${ROOT}/repositories/CodeForme # Note: don't update the sha of previous versions because the install will take forever # instead, update the repo state in a later step -ARG SHA=1eb588cbf19924333b88beaa1ac0041904966640 +ARG SHA=2995107fa24cfd72b0a991e18271dcde148c2807 RUN <', """ - GitHub site, Deployed with stable-diffusion-webui-docker + .replace('
', """ +
+
+ Deployed with stable-diffusion-webui-docker +
""", 1) ) diff --git a/services/lstein/mount.sh b/services/lstein/mount.sh index 0b31bdf..808c468 100755 --- a/services/lstein/mount.sh +++ b/services/lstein/mount.sh @@ -1,28 +1,27 @@ #!/bin/bash -set -eu +set -Eeuo pipefail -ROOT=/stable-diffusion +declare -A MOUNTS -mkdir -p "${ROOT}/models/ldm/stable-diffusion-v1/" -ln -sf /cache/models/model.ckpt "${ROOT}/models/ldm/stable-diffusion-v1/model.ckpt" +# cache +MOUNTS["/root/.cache"]=/data/.cache +# ui specific +MOUNTS["${PWD}/models/ldm/stable-diffusion-v1/model.ckpt"]=/data/StableDiffusion/model.ckpt +MOUNTS["${PWD}/src/gfpgan/experiments/pretrained_models/GFPGANv1.4.pth"]=/data/GFPGAN/GFPGANv1.4.pth +MOUNTS["${PWD}/ldm/dream/restoration/codeformer/weights"]=/data/CodeFormer +# hacks +MOUNTS["/opt/conda/lib/python3.9/site-packages/facexlib/weights"]=/data/.cache +MOUNTS["/opt/conda/lib/python3.9/site-packages/realesrgan/weights"]=/data/RealESRGAN -base="${ROOT}/src/gfpgan/experiments/pretrained_models/" -mkdir -p "${base}" -# TODO: "real" GFPGANv1.4.pth -ln -sf /cache/models/GFPGANv1.3.pth "${base}/GFPGANv1.4.pth" -echo "Mounted GFPGANv1.3.pth" - -# facexlib -FACEX_WEIGHTS=/opt/conda/lib/python3.9/site-packages/facexlib/weights - -rm -rf "${FACEX_WEIGHTS}" -mkdir -p /cache/weights -ln -sf -T /cache/weights "${FACEX_WEIGHTS}" - -REALESRGAN_WEIGHTS=/opt/conda/lib/python3.9/site-packages/realesrgan/weights -rm -rf "${REALESRGAN_WEIGHTS}" -ln -sf -T /cache/weights "${REALESRGAN_WEIGHTS}" +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 if "${PRELOAD}" == "true"; then python3 -u scripts/preload_models.py