Spaces:
Running
Running
Update inference.sh
Browse files- inference.sh +16 -0
inference.sh
CHANGED
@@ -1,5 +1,14 @@
|
|
1 |
#!/bin/bash
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
python -m scripts.inference \
|
4 |
--unet_config_path "configs/unet/second_stage.yaml" \
|
5 |
--inference_ckpt_path "checkpoints/latentsync_unet.pt" \
|
@@ -7,3 +16,10 @@ python -m scripts.inference \
|
|
7 |
--video_path "assets/demo1_video.mp4" \
|
8 |
--audio_path "assets/demo1_audio.wav" \
|
9 |
--video_out_path "video_out.mp4"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
+
# Check if the correct number of arguments are provided
|
4 |
+
if [ -z "$1" ]; then
|
5 |
+
echo "Usage: $0 [GFPGAN|CodeFormer]"
|
6 |
+
exit 1
|
7 |
+
fi
|
8 |
+
|
9 |
+
SUPERRES=$1 # Read super-resolution method (GFPGAN/CodeFormer)
|
10 |
+
|
11 |
+
# Run Latentsync Inference (NO --superres parameter here)
|
12 |
python -m scripts.inference \
|
13 |
--unet_config_path "configs/unet/second_stage.yaml" \
|
14 |
--inference_ckpt_path "checkpoints/latentsync_unet.pt" \
|
|
|
16 |
--video_path "assets/demo1_video.mp4" \
|
17 |
--audio_path "assets/demo1_audio.wav" \
|
18 |
--video_out_path "video_out.mp4"
|
19 |
+
|
20 |
+
echo "Inference completed. Applying super-resolution using $SUPERRES..."
|
21 |
+
|
22 |
+
# Run Super-Resolution Enhancement
|
23 |
+
python -m scripts.superres --input "video_out.mp4" --output "video_final.mp4" --method "$SUPERRES"
|
24 |
+
|
25 |
+
echo "Super-resolution applied successfully! Output saved as video_final.mp4"
|