forked from akash-network/awesome-akash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
executable file
·59 lines (48 loc) · 1.35 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env bash
echo "$MODELURLS"
echo "$VAEURLS"
echo "$UPSCALEURLS"
echo "$COMMANDLINE_ARGS"
echo "$ENABLE_MANAGER"
if [ -z "$ENABLE_MANAGER" ]; then
echo "Env variable 'ENABLE_MANAGER' is not set. Will not install ComfyUI-Manager"
else
cd "/comfyui/custom_nodes"
git clone "https://github.com/ltdrdata/ComfyUI-Manager.git"
cd /
fi
# split string into array
IFS=',' read -r -a URLS <<< "$MODELURLS"
# loop through array
for modelurl in "${URLS[@]}"
do
# wget the file
wget -nv $modelurl -P /comfyui/models/checkpoints
done
# split string into array
IFS=',' read -r -a VAEURLS <<< "$VAEURLS"
# loop through array
for url in "${VAEURLS[@]}"
do
# wget the file
wget -nv $url -P /comfyui/models/vae
done
# split string into array
IFS=',' read -r -a UPSCALEURLS <<< "$UPSCALEURLS"
# loop through array
for url in "${UPSCALEURLS[@]}"
do
# wget the file
wget -nv $url -P /comfyui/models/upscale_model
done
# if $DELETE_EVERY_12HRS is set to true, delete files in /comfyui/output/ folder every 12 hours
if [ "$DELETE_EVERY_12HRS" = true ] ; then
echo "Deleting files in /comfyui/output/* folder every 12 hours ..."
while true; do
echo "Deleting files in /comfyui/output/* folder ..."
rm -rf /comfyui/output/*
sleep 43200
done &
fi
echo "Starting ComfyUI ..."
python /comfyui/main.py $COMMANDLINE_ARGS