Spaces:
Paused
Paused
Update scripts/run_gradio.sh
Browse files- scripts/run_gradio.sh +19 -2
scripts/run_gradio.sh
CHANGED
|
@@ -1,11 +1,29 @@
|
|
| 1 |
#!/bin/bash
|
|
|
|
| 2 |
JOBS_DIR=$(dirname $(dirname "$0"))
|
| 3 |
export PYTHONPATH=./
|
| 4 |
|
| 5 |
export MODEL_BASE=./weights
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
|
|
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
torchrun --nnodes=1 --nproc_per_node=8 --master_port 29605 hymm_gradio/flask_audio.py \
|
| 11 |
--input 'assets/test.csv' \
|
|
@@ -18,5 +36,4 @@ torchrun --nnodes=1 --nproc_per_node=8 --master_port 29605 hymm_gradio/flask_aud
|
|
| 18 |
--use-deepcache 1 \
|
| 19 |
--flow-shift-eval-video 5.0 &
|
| 20 |
|
| 21 |
-
|
| 22 |
python3 hymm_gradio/gradio_audio.py
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
|
| 3 |
JOBS_DIR=$(dirname $(dirname "$0"))
|
| 4 |
export PYTHONPATH=./
|
| 5 |
|
| 6 |
export MODEL_BASE=./weights
|
| 7 |
+
MODEL_DIR=${MODEL_BASE}/ckpts/hunyuan-video-t2v-720p
|
| 8 |
+
|
| 9 |
+
# Step 1: Download model files from HF using Python
|
| 10 |
+
echo "Downloading model from tencent/HunyuanVideo-Avatar to $MODEL_DIR"
|
| 11 |
+
python3 - <<EOF
|
| 12 |
+
from huggingface_hub import snapshot_download
|
| 13 |
+
import os
|
| 14 |
|
| 15 |
+
target_dir = "${MODEL_DIR}"
|
| 16 |
+
os.makedirs(target_dir, exist_ok=True)
|
| 17 |
|
| 18 |
+
# Download model snapshot
|
| 19 |
+
snapshot_download(repo_id="tencent/HunyuanVideo-Avatar",
|
| 20 |
+
local_dir=target_dir,
|
| 21 |
+
local_dir_use_symlinks=False,
|
| 22 |
+
ignore_patterns=["*.safetensors"]) # Optional: skip very large files if not needed
|
| 23 |
+
EOF
|
| 24 |
+
|
| 25 |
+
# Step 2: Run your scripts
|
| 26 |
+
checkpoint_path=${MODEL_DIR}/transformers/mp_rank_00_model_states.pt
|
| 27 |
|
| 28 |
torchrun --nnodes=1 --nproc_per_node=8 --master_port 29605 hymm_gradio/flask_audio.py \
|
| 29 |
--input 'assets/test.csv' \
|
|
|
|
| 36 |
--use-deepcache 1 \
|
| 37 |
--flow-shift-eval-video 5.0 &
|
| 38 |
|
|
|
|
| 39 |
python3 hymm_gradio/gradio_audio.py
|