Spaces:
Build error
Build error
File size: 1,157 Bytes
357c94c 5aef126 357c94c 5aef126 357c94c 5aef126 357c94c 5aef126 357c94c |
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 36 37 38 39 40 |
#!/bin/bash
JOBS_DIR=$(dirname $(dirname "$0"))
export PYTHONPATH=./
export MODEL_BASE=./weights
MODEL_DIR=${MODEL_BASE}/ckpts/hunyuan-video-t2v-720p
# Step 1: Download model files from HF using Python
echo "Downloading model from tencent/HunyuanVideo-Avatar to $MODEL_DIR"
python3 - <<EOF
from huggingface_hub import snapshot_download
import os
target_dir = "${MODEL_DIR}"
os.makedirs(target_dir, exist_ok=True)
# Download model snapshot
snapshot_download(repo_id="tencent/HunyuanVideo-Avatar",
local_dir=target_dir,
local_dir_use_symlinks=False,
ignore_patterns=["*.safetensors"]) # Optional: skip very large files if not needed
EOF
# Step 2: Run your scripts
checkpoint_path=${MODEL_DIR}/transformers/mp_rank_00_model_states.pt
torchrun --nnodes=1 --nproc_per_node=8 --master_port 29605 hymm_gradio/flask_audio.py \
--input 'assets/test.csv' \
--ckpt ${checkpoint_path} \
--sample-n-frames 129 \
--seed 128 \
--image-size 704 \
--cfg-scale 7.5 \
--infer-steps 50 \
--use-deepcache 1 \
--flow-shift-eval-video 5.0 &
python3 hymm_gradio/gradio_audio.py
|