From 136794ea442bb7c7d9cbb4b1e3507af9b3ff3e4e Mon Sep 17 00:00:00 2001 From: lixingyuan Date: Tue, 30 Dec 2025 15:05:29 +0800 Subject: [PATCH] fix(tools): prevent aria2c from hanging after downloads in dlmodels.sh Ensure aria2c exits cleanly after finishing downloads instead of waiting indefinitely. --- tools/dlmodels.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/dlmodels.sh b/tools/dlmodels.sh index 9482db4af..447721581 100755 --- a/tools/dlmodels.sh +++ b/tools/dlmodels.sh @@ -25,6 +25,8 @@ check_dir "./assets/uvr5_weights/onnx_dereverb_By_FoxJoy" echo "dir check finished." +ARIA2_OPTS="--no-conf=true --enable-rpc=false --console-log-level=error -c -x 16 -s 16 -k 1M" + echo "required files check start." check_file_pretrained() { printf "checking %s\n" "$2" @@ -49,7 +51,7 @@ check_file_special() { else echo failed. starting download from huggingface. if command -v aria2c > /dev/null 2>&1; then - aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/"$2" -d ./assets/"$1" -o "$2" + aria2c $ARIA2_OPTS https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/"$2" -d ./assets/"$1" -o "$2" [ -f "./assets/""$1""/""$2""" ] && echo "download successful." || { echo "please try again!" && exit 1; } else echo "aria2c command not found. Please install aria2c and try again."