Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 5af08eb
Author: AbdBarho <[email protected]>
Date:   Sun Nov 27 20:12:59 2022 +0100

    SD v2.0

commit 8df9d10
Author: AbdBarho <[email protected]>
Date:   Wed Nov 30 19:33:44 2022 +0100

    Update versions (AbdBarho#246)

    - hlky:
    Sygil-Dev/sygil-webui@18a3b80
    - lstein:
    invoke-ai/InvokeAI@a9aa4e4

commit 7a1e52b
Author: AbdBarho <[email protected]>
Date:   Sat Nov 26 15:45:53 2022 +0100

    Enable extensions by default (AbdBarho#243)

    Closes AbdBarho#242

commit d20b873
Author: AbdBarho <[email protected]>
Date:   Fri Nov 25 13:25:10 2022 +0100

    Update xformers (AbdBarho#241)

    facebookresearch/xformers@8910bb5

commit 23757d2
Author: AbdBarho <[email protected]>
Date:   Sun Nov 20 11:35:56 2022 +0100

    Update invoke (AbdBarho#234)

    invoke-ai/InvokeAI@2b7e3ab

commit 9e7979b
Author: AbdBarho <[email protected]>
Date:   Sun Nov 20 11:05:39 2022 +0100

    Update Versions (AbdBarho#230)

    - auto:
    AUTOMATIC1111/stable-diffusion-webui@47a44c7
    - hlky:
    Sygil-Dev/sygil-webui@269107a

    Refs AbdBarho#216

commit 8623c73
Author: AbdBarho <[email protected]>
Date:   Sun Nov 13 08:42:27 2022 +0100

    v1.5 Inpainting (AbdBarho#221)

    Also remove v1.4

    Closes AbdBarho#217

commit 9b6750b
Author: AbdBarho <[email protected]>
Date:   Sun Nov 13 07:12:17 2022 +0100

    Use cuda 11.6 for auto (AbdBarho#220)

    auto:
    AUTOMATIC1111/stable-diffusion-webui@98947d1

    Closes AbdBarho#218 AbdBarho#219

commit 5e3f20b
Author: AbdBarho <[email protected]>
Date:   Sat Nov 12 18:33:59 2022 +0100

    Move contribution to the top
  • Loading branch information
torun225 committed Dec 8, 2022
1 parent cbbf1cf commit 7da7592
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
<<: *base_service
profiles: ["auto"]
build: ./services/AUTOMATIC1111
image: sd-auto:17.2
image: sd-auto:19
environment:
- CLI_ARGS=--allow-code --medvram --deepdanbooru --gradio-auth torun225:torun225 --xformers --enable-insecure-extension-access
# tty: true
Expand All @@ -43,7 +43,7 @@ services:
<<: *base_service
profiles: ["hlky"]
build: ./services/hlky/
image: sd-hlky:9
image: sd-hlky:10
environment:
- CLI_ARGS=--optimized-turbo
- USE_STREAMLIT=0
Expand All @@ -52,7 +52,7 @@ services:
<<: *base_service
profiles: ["lstein"]
build: ./services/lstein/
image: sd-lstein:7
image: sd-lstein:8
environment:
- PRELOAD=true
- CLI_ARGS=--max_loaded_models=1
14 changes: 7 additions & 7 deletions services/AUTOMATIC1111/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ EOF
RUN . /clone.sh taming-transformers https://github.com/CompVis/taming-transformers.git 24268930bf1dce879235a7fddd0b2355b84d7ea6 \
&& rm -rf data assets **/*.ipynb

RUN . /clone.sh stable-diffusion-stability-ai https://github.com/Stability-AI/stablediffusion 47b6b607fdd31875c9279cd2f4f16b92e4ea958e \
RUN . /clone.sh stable-diffusion-stability-ai https://github.com/Stability-AI/stablediffusion.git 47b6b607fdd31875c9279cd2f4f16b92e4ea958e \
&& rm -rf assets data/**/*.png data/**/*.jpg data/**/*.gif

RUN . /clone.sh CodeFormer https://github.com/sczhou/CodeFormer.git c5b4593074ba6214284d6acd5f1719b6c5d739af \
&& rm -rf assets inputs

RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 48211a1594f1321b00f14c9f7a5b4813144b2fb9
RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git 60e5042ca0da89c14d1dd59d73883280f8fce991
RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git 5b3af030dd83e0297272d861c19477735d0317ec
RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2486589f24165c8e3b303f84e9dbbea318df83e8


FROM alpine:3 as xformers
RUN apk add aria2
RUN aria2c --dir / --out wheel.whl 'https://github.com/AbdBarho/stable-diffusion-webui-docker/releases/download/2.1.0/xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl'
RUN aria2c -x 10 --dir / --out wheel.whl 'https://github.com/AbdBarho/stable-diffusion-webui-docker/releases/download/3.1.0/xformers-0.0.15.dev0+4e3631d.d20221125-cp310-cp310-linux_x86_64.whl'

FROM python:3.10-slim

Expand All @@ -41,13 +41,13 @@ RUN apt-get update && apt install fonts-dejavu-core rsync git jq moreutils -y &&
RUN <<EOF
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
git reset --hard 828438b4a190759807f9054932cae3a8b880ddf1
git reset --hard 98947d173e3f1667eba29c904f681047dea9de90
pip install -r requirements_versions.txt
EOF


COPY --from=xformers /wheel.whl xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl
RUN pip install xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl && rm xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl
COPY --from=xformers /wheel.whl xformers-0.0.15-cp310-cp310-linux_x86_64.whl
RUN pip install xformers-0.0.15-cp310-cp310-linux_x86_64.whl && rm xformers-0.0.15-cp310-cp310-linux_x86_64.whl


ENV ROOT=/stable-diffusion-webui
Expand All @@ -64,6 +64,7 @@ RUN [[ "${DEEPDANBOORU:-0}" == "0" ]] && : || pip install tensorflow-cpu==2.10 t
RUN pip install opencv-python-headless \
git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 \
git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b \
pyngrok

# Note: don't update the sha of previous versions because the install will take forever
Expand All @@ -79,7 +80,6 @@ pip install -r requirements_versions.txt
EOF

RUN pip install opencv-python-headless
RUN pip install open_clip_torch

COPY . /docker

Expand Down
2 changes: 1 addition & 1 deletion services/hlky/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ EOF

RUN apt-get update && apt install libsndfile1 ffmpeg -y && apt-get clean

ARG BRANCH=dev SHA=269107a104fc9fee3201eb2c56cf7adb3d063e4b
ARG BRANCH=dev SHA=18a3b809275c395b9a2730c78d6bc0f9b06671e1
RUN <<EOF
cd stable-diffusion
git fetch
Expand Down
7 changes: 4 additions & 3 deletions services/lstein/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pip install -r requirements.txt
EOF


ARG BRANCH=development SHA=2b7e3abe57963d199f1d825ddef87ae154c81045
ARG BRANCH=development SHA=a9aa4e45aa6f5d5a2aa385349131d8733dd380fa
RUN <<EOF
git fetch
git reset --hard
Expand All @@ -32,11 +32,12 @@ git reset --hard ${SHA}
pip install -r requirements.txt
EOF

RUN pip uninstall opencv-python -y && pip install --force-reinstall opencv-python-headless==4.5.5.64
RUN pip install --force-reinstall opencv-python-headless==4.5.5.64

COPY . /docker/
RUN <<EOF
python3 /docker/info.py /stable-diffusion/frontend/dist/index.html
touch ~/.invokeai
EOF


Expand All @@ -45,4 +46,4 @@ EXPOSE 7860


ENTRYPOINT ["/docker/entrypoint.sh"]
CMD python3 -u scripts/invoke.py --outdir /output --web --host 0.0.0.0 --port 7860 ${CLI_ARGS}
CMD python3 -u scripts/invoke.py --web --host 0.0.0.0 --port 7860 --config /docker/models.yaml --root_dir . --outdir /output ${CLI_ARGS}
9 changes: 8 additions & 1 deletion services/lstein/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@ MOUNTS["${ROOT}/models/bert-base-uncased"]=/data/.cache/huggingface/transformers
MOUNTS["${ROOT}/models/openai/clip-vit-large-patch14"]=/data/.cache/huggingface/transformers
MOUNTS["${ROOT}/models/CompVis/stable-diffusion-safety-checker"]=/data/.cache/huggingface/transformers

<<<<<<< HEAD
MOUNTS["${ROOT}/configs/models.yaml"]=/docker/models.yaml
=======

>>>>>>> 5af08ebb9c688ad109a045ababa3d3fa7122bf79
# hacks
MOUNTS["/opt/conda/lib/python3.10/site-packages/facexlib/weights"]=/data/.cache/
MOUNTS["${ROOT}/models/clipseg"]=/data/.cache/invoke/clipseg/

<<<<<<< HEAD
# MOUNTS["/opt/conda/lib/python3.9/site-packages/realesrgan/weights"]=/data/RealESRGAN
=======
>>>>>>> 5af08ebb9c688ad109a045ababa3d3fa7122bf79

for to_path in "${!MOUNTS[@]}"; do
set -Eeuo pipefail
Expand All @@ -41,7 +48,7 @@ for to_path in "${!MOUNTS[@]}"; do
done

if "${PRELOAD}" == "true"; then
python3 -u scripts/preload_models.py --no-interactive
python3 -u scripts/preload_models.py --no-interactive --root . --config_file /docker/models.yaml
fi

exec "$@"

0 comments on commit 7da7592

Please sign in to comment.