Spaces:
Running
Running
| set -e | |
| echo "=== MuseTalk Entrypoint ===" | |
| whoami | |
| source /opt/conda/etc/profile.d/conda.sh | |
| conda activate musev | |
| which python | |
| cd /home/user/app/MuseTalk | |
| ModelsDir="models" | |
| echo "=== Validating pre-built model files ===" | |
| missing=0 | |
| for f in \ | |
| "$ModelsDir/musetalkV15/unet.pth" \ | |
| "$ModelsDir/sd-vae/diffusion_pytorch_model.safetensors" \ | |
| "$ModelsDir/whisper/config.json" \ | |
| "$ModelsDir/dwpose/dw-ll_ucoco_384.pth" \ | |
| "$ModelsDir/syncnet/latentsync_syncnet.pt" \ | |
| "$ModelsDir/face-parse-bisent/79999_iter.pth" \ | |
| "$ModelsDir/face-parse-bisent/resnet18-5c106cde.pth"; do | |
| if [ ! -f "$f" ] && [ ! -f "${f%.safetensors}.bin" ]; then | |
| echo "WARNING: Missing $f" | |
| missing=$((missing + 1)) | |
| else | |
| echo " OK: $f" | |
| fi | |
| done | |
| if [ $missing -gt 0 ]; then | |
| echo "WARNING: $missing model file(s) missing — app may fail at runtime" | |
| else | |
| echo "All models present." | |
| fi | |
| export GRADIO_TEMP_DIR=/tmp | |
| echo "Starting MuseTalk app on port 7860..." | |
| exec python app.py | |