1
0
mirror of synced 2024-11-23 23:21:03 +01:00

fix: dlmodels.sh exits after download single file (#2175)

This commit is contained in:
Coming 2024-08-28 16:41:39 +08:00 committed by GitHub
parent b405aed417
commit cfc1e24489
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,7 +34,7 @@ check_file_pretrained() {
echo failed. starting download from huggingface. echo failed. starting download from huggingface.
if command -v aria2c > /dev/null 2>&1; then 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/"$1"/"$2" -d ./assets/"$1" -o "$2" aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/"$1"/"$2" -d ./assets/"$1" -o "$2"
[ -f "./assets/""$1""/""$2""" ] && echo "download successful." || echo "please try again!" && exit 1 [ -f "./assets/""$1""/""$2""" ] && echo "download successful." || { echo "please try again!" && exit 1; }
else else
echo "aria2c command not found. Please install aria2c and try again." echo "aria2c command not found. Please install aria2c and try again."
exit 1 exit 1
@ -50,7 +50,7 @@ check_file_special() {
echo failed. starting download from huggingface. echo failed. starting download from huggingface.
if command -v aria2c > /dev/null 2>&1; then 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 --console-log-level=error -c -x 16 -s 16 -k 1M 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 [ -f "./assets/""$1""/""$2""" ] && echo "download successful." || { echo "please try again!" && exit 1; }
else else
echo "aria2c command not found. Please install aria2c and try again." echo "aria2c command not found. Please install aria2c and try again."
exit 1 exit 1