Create download_models.sh
Browse files- download_models.sh +39 -0
download_models.sh
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Function to download a file if it doesn't exist
|
4 |
+
download_file() {
|
5 |
+
local url=$1
|
6 |
+
local target_dir=$2
|
7 |
+
local target_file=$3
|
8 |
+
|
9 |
+
if [ ! -f "${target_file}" ]; then
|
10 |
+
echo "Downloading ${target_file}..."
|
11 |
+
mkdir -p "${target_dir}"
|
12 |
+
wget -O "${target_file}" "${url}" --progress=bar:force:noscroll
|
13 |
+
else
|
14 |
+
echo "${target_file} already exists, skipping download."
|
15 |
+
fi
|
16 |
+
}
|
17 |
+
|
18 |
+
|
19 |
+
# VAE model
|
20 |
+
download_file "https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/ae.sft?download=true" \
|
21 |
+
"/ComfyUI/models/vae" \
|
22 |
+
"/ComfyUI/models/vae/ae.sft"
|
23 |
+
|
24 |
+
# Diffusion model
|
25 |
+
download_file "https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/flux1-dev.sft?download=true" \
|
26 |
+
"/ComfyUI/models/diffusion_models" \
|
27 |
+
"/ComfyUI/models/diffusion_models/flux1-dev.sft"
|
28 |
+
|
29 |
+
# CLIP models
|
30 |
+
download_file "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors?download=true" \
|
31 |
+
"/ComfyUI/models/clip" \
|
32 |
+
"/ComfyUI/models/clip/clip_l.safetensors"
|
33 |
+
|
34 |
+
download_file "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn.safetensors?download=true" \
|
35 |
+
"/ComfyUI/models/clip" \
|
36 |
+
"/ComfyUI/models/clip/t5xxl_fp8_e4m3fn.safetensors"
|
37 |
+
|
38 |
+
|
39 |
+
echo "All required files have been checked/Downloaded!"
|