Created
December 30, 2025 02:26
-
-
Save salsa2k/cbc493b1bac29c5af6b030384f20e48f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script to populate RunPod Network Volume with required models | |
| # Run this script inside a temporary RunPod pod with the Network Volume mounted at /runpod-volume | |
| BASE_DIR="/runpod-volume/models" | |
| echo "Creating directory structure..." | |
| mkdir -p "$BASE_DIR/checkpoints" | |
| mkdir -p "$BASE_DIR/unet" | |
| mkdir -p "$BASE_DIR/diffusion_models" | |
| mkdir -p "$BASE_DIR/vae" | |
| mkdir -p "$BASE_DIR/text_encoders" | |
| echo "Downloading models..." | |
| # Helper function to download if not exists | |
| download_if_missing() { | |
| local url="$1" | |
| local dest="$2" | |
| if [ -f "$dest" ]; then | |
| echo "File exists, skipping: $dest" | |
| else | |
| echo "Downloading: $dest" | |
| wget -O "$dest" "$url" | |
| fi | |
| } | |
| # --- FLUX Dev FP8 --- | |
| download_if_missing \ | |
| "https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors" \ | |
| "$BASE_DIR/checkpoints/flux1-dev-fp8.safetensors" | |
| # --- FLUX Kontext --- | |
| echo "Using FP8 Kontext for cloud GPU..." | |
| download_if_missing \ | |
| "https://huggingface.co/Comfy-Org/flux1-kontext-dev_ComfyUI/resolve/main/split_files/diffusion_models/flux1-dev-kontext_fp8_scaled.safetensors" \ | |
| "$BASE_DIR/diffusion_models/flux1-dev-kontext_fp8_scaled.safetensors" | |
| # --- ZTurbo Diffusion Model --- | |
| download_if_missing \ | |
| "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/diffusion_models/z_image_turbo_bf16.safetensors" \ | |
| "$BASE_DIR/diffusion_models/z_image_turbo_bf16.safetensors" | |
| # --- ZTurbo VAE --- | |
| download_if_missing \ | |
| "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors" \ | |
| "$BASE_DIR/vae/ae.safetensors" | |
| # --- Qwen 3.4B (CLIP) --- | |
| download_if_missing \ | |
| "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors" \ | |
| "$BASE_DIR/text_encoders/qwen_3_4b.safetensors" | |
| # --- CLIP-L Encoder --- | |
| download_if_missing \ | |
| "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors" \ | |
| "$BASE_DIR/text_encoders/clip_l.safetensors" | |
| # --- T5-XXL FP8 --- | |
| download_if_missing \ | |
| "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn_scaled.safetensors" \ | |
| "$BASE_DIR/text_encoders/t5xxl_fp8_e4m3fn_scaled.safetensors" | |
| echo "All models downloaded successfully!" | |
| echo "Volume populated at $BASE_DIR" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment