mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-06-13 12:04:56 +03:00
402c691a49
1. Update `docker-compose.yml`: use `PRELOAD=true` for lstein. See the [note](https://github.com/invoke-ai/InvokeAI/blob/94bad8555a8832eca01ed7da6797f65cf6bb9cfb/docs/installation/INSTALL_LINUX.md?plain=1#L60) in the installation guide of InvokeAI. 3. Fix `services/lstein/mount.sh`: change `CodeFormer` to `Codeformer`. 4. Update `services/lstein/mount.sh`: avoid having to re-download the `${PWD}/gfpgan/weights/...` every time the container is started.
30 lines
907 B
Bash
Executable File
30 lines
907 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -Eeuo pipefail
|
|
|
|
declare -A MOUNTS
|
|
|
|
# cache
|
|
MOUNTS["/root/.cache"]=/data/.cache
|
|
# ui specific
|
|
MOUNTS["${PWD}/models/ldm/stable-diffusion-v1/model.ckpt"]=/data/StableDiffusion/model.ckpt
|
|
MOUNTS["${PWD}/src/gfpgan/experiments/pretrained_models/GFPGANv1.4.pth"]=/data/GFPGAN/GFPGANv1.4.pth
|
|
MOUNTS["${PWD}/ldm/invoke/restoration/codeformer/weights"]=/data/Codeformer
|
|
# hacks
|
|
MOUNTS["/opt/conda/lib/python3.9/site-packages/facexlib/weights"]=/data/.cache
|
|
MOUNTS["/opt/conda/lib/python3.9/site-packages/realesrgan/weights"]=/data/RealESRGAN
|
|
MOUNTS["${PWD}/gfpgan/weights"]=/data/.cache
|
|
|
|
for to_path in "${!MOUNTS[@]}"; do
|
|
set -Eeuo pipefail
|
|
from_path="${MOUNTS[${to_path}]}"
|
|
rm -rf "${to_path}"
|
|
mkdir -p "$(dirname "${to_path}")"
|
|
ln -sT "${from_path}" "${to_path}"
|
|
echo Mounted $(basename "${from_path}")
|
|
done
|
|
|
|
if "${PRELOAD}" == "true"; then
|
|
python3 -u scripts/preload_models.py
|
|
fi
|