stable-diffusion-webui-docker/services/lstein/mount.sh
AbdBarho 710280c7ab
Update versions (#120)
- auto:
2995107fa2
  - More samplers
  - Textual inversion training
- hlky:
1a9c053cb7
  - Build times are SLOW
- lstein:
4f247a3672
  - Prepare for 2.0 release
  - very cool new UI!
2022-10-07 09:46:07 +02:00

29 lines
861 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/dream/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
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