Selaa lähdekoodia

Auto: clean up interrogators (#265)

AbdBarho 3 vuotta sitten
vanhempi
sitoutus
41e0dcc2f6

+ 1 - 0
data/.gitignore

@@ -12,6 +12,7 @@
 /RealESRGAN
 /RealESRGAN
 /SwinIR
 /SwinIR
 /MiDaS
 /MiDaS
+/BLIP
 /ScuNET
 /ScuNET
 /LDSR
 /LDSR
 /Deepdanbooru
 /Deepdanbooru

+ 1 - 1
docker-compose.yml

@@ -27,7 +27,7 @@ services:
     <<: *base_service
     <<: *base_service
     profiles: ["auto"]
     profiles: ["auto"]
     build: ./services/AUTOMATIC1111
     build: ./services/AUTOMATIC1111
-    image: sd-auto:22
+    image: sd-auto:23
     environment:
     environment:
       - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api
       - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api
 
 

+ 7 - 8
services/AUTOMATIC1111/Dockerfile

@@ -56,13 +56,11 @@ ENV ROOT=/stable-diffusion-webui
 
 
 COPY --from=download /git/ ${ROOT}
 COPY --from=download /git/ ${ROOT}
 RUN mkdir ${ROOT}/interrogate && cp ${ROOT}/repositories/clip-interrogator/data/* ${ROOT}/interrogate
 RUN mkdir ${ROOT}/interrogate && cp ${ROOT}/repositories/clip-interrogator/data/* ${ROOT}/interrogate
-RUN pip install -r ${ROOT}/repositories/CodeFormer/requirements.txt
+RUN --mount=type=cache,target=/root/.cache/pip \
+  pip install -r ${ROOT}/repositories/CodeFormer/requirements.txt
 
 
-
-ARG DEEPDANBOORU="0"
-RUN [[ "${DEEPDANBOORU:-0}" == "0" ]] && : || pip install tensorflow-cpu==2.10 tensorflow-io==0.27.0 git+https://github.com/KichangKim/DeepDanbooru.git@edf73df4cdaeea2cf00e9ac08bd8a9026b7a7b26#egg=deepdanbooru
-
-RUN pip install opencv-python-headless \
+RUN --mount=type=cache,target=/root/.cache/pip \
+  pip install opencv-python-headless \
   git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 \
   git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 \
   git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
   git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
   git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b \
   git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b \
@@ -72,14 +70,15 @@ RUN pip install opencv-python-headless \
 # instead, update the repo state in a later step
 # instead, update the repo state in a later step
 
 
 ARG SHA=685f9631b56ff8bd43bce24ff5ce0f9a0e9af490
 ARG SHA=685f9631b56ff8bd43bce24ff5ce0f9a0e9af490
-RUN <<EOF
+RUN --mount=type=cache,target=/root/.cache/pip <<EOF
 cd stable-diffusion-webui
 cd stable-diffusion-webui
 git fetch
 git fetch
 git reset --hard ${SHA}
 git reset --hard ${SHA}
 pip install -r requirements_versions.txt
 pip install -r requirements_versions.txt
 EOF
 EOF
 
 
-RUN pip install opencv-python-headless transformers==4.24.0
+RUN --mount=type=cache,target=/root/.cache/pip \
+  pip install opencv-python-headless transformers==4.24
 
 
 COPY . /docker
 COPY . /docker
 
 

+ 2 - 1
services/AUTOMATIC1111/entrypoint.sh

@@ -30,7 +30,8 @@ MOUNTS["${ROOT}/models/SwinIR"]="/data/SwinIR"
 MOUNTS["${ROOT}/models/ScuNET"]="/data/ScuNET"
 MOUNTS["${ROOT}/models/ScuNET"]="/data/ScuNET"
 MOUNTS["${ROOT}/models/LDSR"]="/data/LDSR"
 MOUNTS["${ROOT}/models/LDSR"]="/data/LDSR"
 MOUNTS["${ROOT}/models/hypernetworks"]="/data/Hypernetworks"
 MOUNTS["${ROOT}/models/hypernetworks"]="/data/Hypernetworks"
-MOUNTS["${ROOT}/models/deepbooru"]="/data/Deepdanbooru"
+MOUNTS["${ROOT}/models/torch_deepdanbooru"]="/data/Deepdanbooru"
+MOUNTS["${ROOT}/models/BLIP"]="/data/BLIP"
 MOUNTS["${ROOT}/models/midas"]="/data/MiDaS"
 MOUNTS["${ROOT}/models/midas"]="/data/MiDaS"
 
 
 MOUNTS["${ROOT}/embeddings"]="/data/embeddings"
 MOUNTS["${ROOT}/embeddings"]="/data/embeddings"