Spaces:
Sleeping
Sleeping
# Check if the correct number of arguments are provided | |
if [ -z "$1" ]; then | |
echo "Usage: $0 [GFPGAN|CodeFormer]" | |
exit 1 | |
fi | |
SUPERRES=$1 # Read super-resolution method (GFPGAN/CodeFormer) | |
# Run Latentsync Inference (NO --superres parameter here) | |
python -m scripts.inference \ | |
--unet_config_path "configs/unet/second_stage.yaml" \ | |
--inference_ckpt_path "checkpoints/latentsync_unet.pt" \ | |
--guidance_scale 1.0 \ | |
--video_path "assets/demo1_video.mp4" \ | |
--audio_path "assets/demo1_audio.wav" \ | |
--video_out_path "video_out.mp4" | |
echo "Inference completed. Applying super-resolution using $SUPERRES..." | |
# Run Super-Resolution Enhancement | |
python -m scripts.superres --input "video_out.mp4" --output "video_final.mp4" --method "$SUPERRES" | |
echo "Super-resolution applied successfully! Output saved as video_final.mp4" | |