stable-diffusion-webui-docker/services/comfy/entrypoint.sh
LEv145 d47e77f19c
Update/fix mounts for comfyUI (#432)
I updated the paths to make all paths work

Now paths in ComfyUI are working
Added: 
- `input`
- `models/configs`
- `models/gligen`
- `models/diffusers`
- `models/hypernetworks`

Was broken:
- `custom_nodes`
- `models/clip_vision` 
- `models/clip`

---------

Co-authored-by: LEv145 <you@example.com>
Co-authored-by: AbdBarho <ka70911@gmail.com>
2023-05-07 11:11:30 +02:00

26 lines
526 B
Bash
Executable File

#!/bin/bash
set -Eeuo pipefail
mkdir -vp /data/config/comfy/
declare -A MOUNTS
MOUNTS["/root/.cache"]="/data/.cache"
MOUNTS["${ROOT}/input"]="/data/config/comfy/input"
MOUNTS["${ROOT}/output"]="/output/comfy"
for to_path in "${!MOUNTS[@]}"; do
set -Eeuo pipefail
from_path="${MOUNTS[${to_path}]}"
rm -rf "${to_path}"
if [ ! -f "$from_path" ]; then
mkdir -vp "$from_path"
fi
mkdir -vp "$(dirname "${to_path}")"
ln -sT "${from_path}" "${to_path}"
echo Mounted $(basename "${from_path}")
done
exec "$@"