diff --git a/docker-compose.yml b/docker-compose.yml index ab0a0c7..72ea586 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,8 +30,12 @@ services: <<: *base_service profiles: ["auto"] build: ./services/AUTOMATIC1111 +<<<<<<< HEAD image: sd-auto:63 restart: always +======= + image: sd-auto:67 +>>>>>>> 6a34739135eb112667f00943c1fac98ab294716a environment: - CLI_ARGS=--allow-code --medvram --enable-insecure-extension-access --xformers --api --listen --port 7880 --ckpt models/Stable-diffusion/sd_xl_base_1.0.safetensors @@ -62,7 +66,7 @@ services: <<: *base_service profiles: ["comfy"] build: ./services/comfy/ - image: sd-comfy:4 + image: sd-comfy:5 environment: - CLI_ARGS= diff --git a/services/AUTOMATIC1111/Dockerfile b/services/AUTOMATIC1111/Dockerfile index 3500601..a9bc718 100644 --- a/services/AUTOMATIC1111/Dockerfile +++ b/services/AUTOMATIC1111/Dockerfile @@ -2,18 +2,16 @@ FROM alpine/git:2.36.2 as download COPY clone.sh /clone.sh -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.git 47b6b607fdd31875c9279cd2f4f16b92e4ea958e \ +RUN . /clone.sh stable-diffusion-stability-ai https://github.com/Stability-AI/stablediffusion.git cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf \ && 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 c9fe758757e022f05ca5a53fa8fac28889e4f1cf -RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2486589f24165c8e3b303f84e9dbbea318df83e8 +RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git ab527a9a6d347f364e3d185ba6d714e22d80cb3c +RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2cf03aaf6e704197fd0dae7c7f96aa59cf1b11c9 RUN . /clone.sh generative-models https://github.com/Stability-AI/generative-models 45c443b316737a4ab6e40413d7794a7f5657c19f @@ -40,13 +38,16 @@ RUN --mount=type=cache,target=/cache --mount=type=cache,target=/root/.cache/pip pip install /cache/torch-2.0.1-cp310-cp310-linux_x86_64.whl torchvision --index-url https://download.pytorch.org/whl/cu118 - RUN --mount=type=cache,target=/root/.cache/pip \ git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git && \ cd stable-diffusion-webui && \ +<<<<<<< HEAD git switch dev && \ git pull && \ git fetch && \ +======= + git reset --hard 5ef669de080814067961f28357256e8fe27544f4 && \ +>>>>>>> 6a34739135eb112667f00943c1fac98ab294716a pip install -r requirements_versions.txt @@ -61,7 +62,7 @@ ENV ROOT=/stable-diffusion-webui COPY --from=download /repositories/ ${ROOT}/repositories/ -RUN mkdir ${ROOT}/interrogate && cp ${ROOT}/repositories/clip-interrogator/data/* ${ROOT}/interrogate +RUN mkdir ${ROOT}/interrogate && cp ${ROOT}/repositories/clip-interrogator/clip_interrogator/data/* ${ROOT}/interrogate RUN --mount=type=cache,target=/root/.cache/pip \ pip install -r ${ROOT}/repositories/CodeFormer/requirements.txt @@ -74,6 +75,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ # git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \ # git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b + # Note: don't update the sha of previous versions because the install will take forever # instead, update the repo state in a later step @@ -81,12 +83,21 @@ RUN --mount=type=cache,target=/root/.cache/pip \ RUN apt-get -y install libgoogle-perftools-dev && apt-get clean ENV LD_PRELOAD=libtcmalloc.so +<<<<<<< HEAD #ARG SHA=68f336bd994bed5442ad95bad6b6ad5564a5409a #RUN --mount=type=cache,target=/root/.cache/pip \ # cd stable-diffusion-webui && \ # git fetch && \ # git reset --hard ${SHA} && \ # pip install -r requirements_versions.txt +======= +ARG SHA=5ef669de080814067961f28357256e8fe27544f4 +RUN --mount=type=cache,target=/root/.cache/pip \ + cd stable-diffusion-webui && \ + git fetch && \ + git reset --hard ${SHA} && \ + pip install -r requirements_versions.txt +>>>>>>> 6a34739135eb112667f00943c1fac98ab294716a COPY . /docker diff --git a/services/AUTOMATIC1111/entrypoint.sh b/services/AUTOMATIC1111/entrypoint.sh index 5cdaacf..52f025f 100755 --- a/services/AUTOMATIC1111/entrypoint.sh +++ b/services/AUTOMATIC1111/entrypoint.sh @@ -62,6 +62,12 @@ shopt -s nullglob # For install.py, please refer to https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Developing-extensions#installpy list=(./extensions/*/install.py) for installscript in "${list[@]}"; do + EXTNAME=`echo $installscript | cut -d '/' -f 3` + # Skip installing dependencies if extension is disabled in config + if `jq -e ".disabled_extensions|any(. == \"$EXTNAME\")" config.json`; then + echo "Skipping disabled extension ($EXTNAME)" + continue + fi PYTHONPATH=${ROOT} python "$installscript" done diff --git a/services/comfy/Dockerfile b/services/comfy/Dockerfile index 1cc2600..6d1f6ce 100644 --- a/services/comfy/Dockerfile +++ b/services/comfy/Dockerfile @@ -24,7 +24,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ WORKDIR ${ROOT} -ARG BRANCH=master SHA=8607c2d42d10b0108de02528e813cc703e58813f +ARG BRANCH=master SHA=7e941f9f247f9b013a33c2e7d117466108414e99 RUN --mount=type=cache,target=/root/.cache/pip \ git fetch && \ git checkout ${BRANCH} && \