From 5d379bf7bc19e5e672651818587c6b99ab75404b Mon Sep 17 00:00:00 2001 From: Simon Oelerich <54176035+gmasil@users.noreply.github.com> Date: Wed, 5 Apr 2023 19:09:07 +0200 Subject: [PATCH] Add mounts for `openpose` (#387) Upon enabling the ControlNet addon from https://github.com/AbdBarho/stable-diffusion-webui-docker/pull/385 one might want to use the `openpose` preprocessors. Those are downloaded by the addon the first time they are used. Without proper mounts those networks will be downloaded on usage after each container start. This PR enables those mounts to reduce data traffic. --- data/.gitignore | 1 + docker-compose.yml | 2 +- services/AUTOMATIC1111/entrypoint.sh | 1 + services/download/download.sh | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/.gitignore b/data/.gitignore index 0c13125..5194313 100644 --- a/data/.gitignore +++ b/data/.gitignore @@ -21,3 +21,4 @@ /embeddings /Lora /ControlNet +/openpose diff --git a/docker-compose.yml b/docker-compose.yml index d9043f4..e005e77 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: <<: *base_service profiles: ["auto"] build: ./services/AUTOMATIC1111 - image: sd-auto:50 + image: sd-auto:51 environment: - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api diff --git a/services/AUTOMATIC1111/entrypoint.sh b/services/AUTOMATIC1111/entrypoint.sh index a6e7e04..c6df995 100755 --- a/services/AUTOMATIC1111/entrypoint.sh +++ b/services/AUTOMATIC1111/entrypoint.sh @@ -36,6 +36,7 @@ MOUNTS["${ROOT}/models/BLIP"]="/data/BLIP" MOUNTS["${ROOT}/models/midas"]="/data/MiDaS" MOUNTS["${ROOT}/models/Lora"]="/data/Lora" MOUNTS["${ROOT}/models/ControlNet"]="/data/ControlNet" +MOUNTS["${ROOT}/models/openpose"]="/data/openpose" MOUNTS["${ROOT}/embeddings"]="/data/embeddings" MOUNTS["${ROOT}/config.json"]="/data/config/auto/config.json" diff --git a/services/download/download.sh b/services/download/download.sh index 15a29ba..54176d0 100755 --- a/services/download/download.sh +++ b/services/download/download.sh @@ -3,7 +3,7 @@ set -Eeuo pipefail # TODO: maybe just use the .gitignore file to create all of these -mkdir -vp /data/.cache /data/StableDiffusion /data/Codeformer /data/GFPGAN /data/ESRGAN /data/BSRGAN /data/RealESRGAN /data/SwinIR /data/LDSR /data/ScuNET /data/embeddings /data/VAE /data/Deepdanbooru /data/MiDaS /data/Lora /data/ControlNet +mkdir -vp /data/.cache /data/StableDiffusion /data/Codeformer /data/GFPGAN /data/ESRGAN /data/BSRGAN /data/RealESRGAN /data/SwinIR /data/LDSR /data/ScuNET /data/embeddings /data/VAE /data/Deepdanbooru /data/MiDaS /data/Lora /data/ControlNet /data/openpose echo "Downloading, this might take a while..."