diff --git a/scripts/chmod.sh b/.devscripts/chmod.sh similarity index 100% rename from scripts/chmod.sh rename to .devscripts/chmod.sh diff --git a/cache/.gitignore b/cache/.gitignore deleted file mode 100644 index a2aafd4..0000000 --- a/cache/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/torch -/transformers -/weights -/models -/custom-models diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 0000000..d8caa8b --- /dev/null +++ b/data/.gitignore @@ -0,0 +1,13 @@ +# for all of the stuff downloaded by transformers, pytorch, and others +/.cache +# for all stable diffusion models (main, waifu diffusion, etc..) +/StableDiffusion +# others +/Codeformer +/GFPGAN +/ESRGAN +/BSRGAN +/RealESRGAN +/SwinIR +/LDSR +# TODO: add the embeddings folder here diff --git a/docker-compose.yml b/docker-compose.yml index e3f80b1..2674e83 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ x-base_service: &base_service ports: - "7860:7860" volumes: - - &v1 ./cache:/cache + - &v1 ./data:/data - &v2 ./output:/output deploy: resources: @@ -30,7 +30,7 @@ services: environment: - CLI_ARGS=--optimized-turbo - automatic1111: &automatic + auto: &automatic <<: *base_service profiles: ["auto"] build: ./services/AUTOMATIC1111 @@ -38,11 +38,10 @@ services: - *v1 - *v2 - ./services/AUTOMATIC1111/config.json:/stable-diffusion-webui/config.json - - ./embeddings:/stable-diffusion-webui/embeddings environment: - CLI_ARGS=--allow-code --medvram - automatic1111-cpu: + auto-cpu: <<: *automatic profiles: ["auto-cpu"] deploy: {} diff --git a/scripts/migratev1tov2.sh b/scripts/migratev1tov2.sh new file mode 100755 index 0000000..0b67158 --- /dev/null +++ b/scripts/migratev1tov2.sh @@ -0,0 +1,30 @@ +mkdir -p data/.cache data/StableDiffusion data/Codeformer data/GFPGAN data/ESRGAN data/BSRGAN data/RealESRGAN data/SwinIR data/LDSR /data/embeddings + +cp -vf cache/models/model.ckpt data/StableDiffusion/model.ckpt + +cp -vf cache/models/LDSR.ckpt data/LDSR/model.ckpt +cp -vf cache/models/LDSR.yaml data/LDSR/project.yaml + +cp -vf cache/models/RealESRGAN_x4plus.pth data/RealESRGAN/ +cp -vf cache/models/RealESRGAN_x4plus_anime_6B.pth data/RealESRGAN/ + +cp -vrf cache/torch data/.cache/ + +mkdir -p data/.cache/huggingface/transformers/ +cp -vrf cache/transformers/* data/.cache/huggingface/transformers/ + +cp -v cache/custom-models/* data/StableDiffusion/ + +mkdir -p data/.cache/clip/ +cp -vf cache/weights/ViT-L-14.pt data/.cache/clip/ + +cp -vf cache/weights/codeformer.pth data/Codeformer/codeformer-v0.1.0.pth + +cp -vf cache/weights/detection_Resnet50_Final.pth data/.cache/ +cp -vf cache/weights/parsing_parsenet.pth data/.cache/ + +cp -v embeddings/* data/embeddings/ + +echo this script was created 10/2022 +echo Dont forget to run: docker compose --profile download up --build +echo the cache and embeddings folders can be deleted, but its not necessary. diff --git a/services/AUTOMATIC1111/Dockerfile b/services/AUTOMATIC1111/Dockerfile index e11d0a5..f6a70a7 100644 --- a/services/AUTOMATIC1111/Dockerfile +++ b/services/AUTOMATIC1111/Dockerfile @@ -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=f80c3696f63a181f720105559d42ee53453ed0eb +ARG SHA=3f417566b0bda8eab05d247567aebf001c1d1725 RUN <