mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-02-07 16:14:18 +01:00
30 lines
829 B
Bash
Executable file
30 lines
829 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -Eeuo pipefail
|
|
|
|
declare -A MOUNTS
|
|
|
|
MOUNTS["/root/.cache"]="/data/.cache"
|
|
|
|
# main
|
|
MOUNTS["${ROOT}/models/Stable-diffusion"]="/data/StableDiffusion"
|
|
MOUNTS["${ROOT}/models/Codeformer"]="/data/Codeformer"
|
|
MOUNTS["${ROOT}/models/GFPGAN"]="/data/GFPGAN"
|
|
MOUNTS["${ROOT}/models/ESRGAN"]="/data/ESRGAN"
|
|
MOUNTS["${ROOT}/models/BSRGAN"]="/data/BSRGAN"
|
|
MOUNTS["${ROOT}/models/RealESRGAN"]="/data/RealESRGAN"
|
|
MOUNTS["${ROOT}/models/SwinIR"]="/data/SwinIR"
|
|
MOUNTS["${ROOT}/models/LDSR"]="/data/LDSR"
|
|
|
|
# extra hacks
|
|
MOUNTS["${ROOT}/repositories/CodeFormer/weights/facelib"]="/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
|