File size: 1,103 Bytes
14130e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Installation script for EchoMimicV3 HuggingFace Space
# Clones source (src.*) and optionally pre-downloads model weights.

set -e

ROOT="$(cd "$(dirname "$0")" && pwd)"
cd "$ROOT"

echo "Installing EchoMimicV3 dependencies..."

if [ ! -d "echomimic_v3" ]; then
    echo "Cloning EchoMimicV3 source from GitHub..."
    git clone --depth 1 https://github.com/antgroup/echomimic_v3.git
fi

pip install -e ./echomimic_v3 --quiet 2>/dev/null || true

# Optional: pre-download weights so first Gradio request is faster.
# Skipped by default; app.py downloads on startup if missing.
if [ "${PREDOWNLOAD_MODELS:-0}" = "1" ]; then
    python - <<'PY'
from huggingface_hub import snapshot_download
import os

os.makedirs("models", exist_ok=True)
snapshot_download("alibaba-pai/Wan2.1-Fun-V1.1-1.3B-InP", local_dir="models/Wan2.1-Fun-V1.1-1.3B-InP")
snapshot_download("BadToBest/EchoMimicV3", allow_patterns=["transformer/*"], local_dir="models")
snapshot_download("facebook/wav2vec2-base-960h", local_dir="models/wav2vec2-base-960h")
print("Models downloaded.")
PY
fi

echo "Installation complete!"