#!/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