Update start.sh
Browse files
start.sh
CHANGED
@@ -36,6 +36,47 @@ if [ -d "/workspace/venv" ]; then
|
|
36 |
source /workspace/venv/bin/activate
|
37 |
fi
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
# Execute the user's script
|
40 |
python3 /workspace/ComfyUI/main.py --listen
|
41 |
|
|
|
36 |
source /workspace/venv/bin/activate
|
37 |
fi
|
38 |
|
39 |
+
|
40 |
+
# Function to download a file if it doesn't exist
|
41 |
+
download_file() {
|
42 |
+
local url=$1
|
43 |
+
local target_dir=$2
|
44 |
+
local target_file=$3
|
45 |
+
|
46 |
+
if [ ! -f "${target_file}" ]; then
|
47 |
+
echo "Downloading ${target_file}..."
|
48 |
+
mkdir -p "${target_dir}"
|
49 |
+
wget -O "${target_file}" "${url}" --progress=bar:force:noscroll
|
50 |
+
else
|
51 |
+
echo "${target_file} already exists, skipping download."
|
52 |
+
fi
|
53 |
+
}
|
54 |
+
|
55 |
+
# VAE model
|
56 |
+
download_file "https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/ae.sft?download=true" \
|
57 |
+
"/ComfyUI/models/vae" \
|
58 |
+
"/ComfyUI/models/vae/ae.sft"
|
59 |
+
|
60 |
+
# Diffusion model
|
61 |
+
download_file "https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/flux1-dev.sft?download=true" \
|
62 |
+
"/ComfyUI/models/diffusion_models" \
|
63 |
+
"/ComfyUI/models/diffusion_models/flux1-dev.sft"
|
64 |
+
|
65 |
+
# CLIP models
|
66 |
+
download_file "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors?download=true" \
|
67 |
+
"/ComfyUI/models/clip" \
|
68 |
+
"/ComfyUI/models/clip/clip_l.safetensors"
|
69 |
+
|
70 |
+
download_file "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn.safetensors?download=true" \
|
71 |
+
"/ComfyUI/models/clip" \
|
72 |
+
"/ComfyUI/models/clip/t5xxl_fp8_e4m3fn.safetensors"
|
73 |
+
|
74 |
+
|
75 |
+
echo "All required files have been checked/Downloaded!"
|
76 |
+
|
77 |
+
|
78 |
+
|
79 |
+
|
80 |
# Execute the user's script
|
81 |
python3 /workspace/ComfyUI/main.py --listen
|
82 |
|