Spaces:
Paused
Paused
| set -e | |
| echo "Setting up Wan2.1 VACE environment..." | |
| # Clone repositories if they don't exist | |
| if [ ! -d "Wan2.1" ]; then | |
| echo "Cloning Wan2.1 repository..." | |
| git clone https://github.com/Wan-Video/Wan2.1.git | |
| fi | |
| if [ ! -d "VACE" ]; then | |
| echo "Cloning VACE repository..." | |
| git clone https://github.com/ali-vilab/VACE.git | |
| fi | |
| # Download model weights with all files | |
| echo "Downloading model weights..." | |
| # Download VACE model (1.3B) - download ALL files | |
| echo "Downloading Wan2.1-VACE-1.3B model (this may take a while)..." | |
| huggingface-cli download Wan-AI/Wan2.1-VACE-1.3B \ | |
| --local-dir Wan2.1-VACE-1.3B \ | |
| --local-dir-use-symlinks False | |
| # Download FLF2V model (14B) - download ALL files | |
| echo "Downloading Wan2.1-FLF2V-14B-720P model (this may take a while)..." | |
| huggingface-cli download Wan-AI/Wan2.1-FLF2V-14B-720P \ | |
| --local-dir Wan2.1-FLF2V-14B-720P \ | |
| --local-dir-use-symlinks False | |
| # Verify critical files exist | |
| echo "Verifying downloaded files..." | |
| CRITICAL_FILES=( | |
| "Wan2.1-VACE-1.3B/models_t5_umt5-xxl-enc-bf16.pth" | |
| "Wan2.1-VACE-1.3B/diffusion_pytorch_model.safetensors" | |
| "Wan2.1-FLF2V-14B-720P/models_t5_umt5-xxl-enc-bf16.pth" | |
| "Wan2.1-FLF2V-14B-720P/diffusion_pytorch_model.safetensors.index.json" | |
| ) | |
| ALL_GOOD=true | |
| for file in "${CRITICAL_FILES[@]}"; do | |
| if [ -f "$file" ]; then | |
| echo "✓ Found: $file" | |
| else | |
| echo "✗ Missing: $file" | |
| ALL_GOOD=false | |
| fi | |
| done | |
| if [ "$ALL_GOOD" = true ]; then | |
| echo "✅ All critical model files downloaded successfully!" | |
| else | |
| echo "❌ Some model files are missing. Please check your internet connection and try again." | |
| exit 1 | |
| fi | |
| echo "Setup complete!" |