File size: 1,109 Bytes
b5e888a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# This script downloads all models listed below

# --- MODEL LIST (each line: URL|DESTINATION_FOLDER) ---
MODELS=(
  "https://civitai.red/api/download/models/3016374?fileId=2895373|/workspace/stable-diffusion-webui-forge/models/Stable-diffusion"
  "https://civitai.red/api/download/models/2531839?fileId=2419609|/workspace/stable-diffusion-webui-forge/models/Stable-diffusion"
  "https://civitai.com/api/download/models/1209350?type=Model&format=SafeTensor|/workspace/stable-diffusion-webui-forge/models/Lora"
  "https://civitai.com/api/download/models/567119?type=Model&format=SafeTensor|/workspace/stable-diffusion-webui-forge/models/Lora"
)

# --- DOWNLOAD LOGIC ---
for entry in "${MODELS[@]}"; do
    url="${entry%%|*}"
    dest="${entry##*|}"
    model_id=$(echo "$url" | grep -oP '/models/\K[0-9]+')
    dest_clean="${dest%/}"
    dest_with_file="${dest_clean}/model_${model_id}.safetensors"
    mkdir -p "$dest_clean"
    echo "📥 Downloading model $model_id..."
    wget -q --show-progress -O "$dest_with_file" "$url" && echo "✅ Saved" || echo "❌ Failed"
done