CoolFace
Apppublic

Clicko777/RVC_HFv2

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
dlmodels.sh567 linesDownload Raw Back to tools
1#!/bin/bash2 3echo working dir is $(pwd)4echo downloading requirement aria2 check.5 6if command -v aria2c &> /dev/null7then8    echo "aria2c command found"9else10    echo failed. please install aria211    sleep 512    exit 113fi14 15d32="f0D32k.pth"16d40="f0D40k.pth"17d48="f0D48k.pth"18g32="f0G32k.pth"19g40="f0G40k.pth"20g48="f0G48k.pth"21 22d40v2="f0D40k.pth"23g40v2="f0G40k.pth"24 25dld32="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D32k.pth"26dld40="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D40k.pth"27dld48="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D48k.pth"28dlg32="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G32k.pth"29dlg40="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G40k.pth"30dlg48="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G48k.pth"31 32dld40v2="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0D40k.pth"33dlg40v2="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0G40k.pth"34 35hp2_all="HP2_all_vocals.pth"36hp3_all="HP3_all_vocals.pth"37hp5_only="HP5_only_main_vocal.pth"38VR_DeEchoAggressive="VR-DeEchoAggressive.pth"39VR_DeEchoDeReverb="VR-DeEchoDeReverb.pth"40VR_DeEchoNormal="VR-DeEchoNormal.pth"41onnx_dereverb="vocals.onnx"42rmvpe="rmvpe.pt"43 44dlhp2_all="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP2_all_vocals.pth"45dlhp3_all="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP3_all_vocals.pth"46dlhp5_only="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP5_only_main_vocal.pth"47dlVR_DeEchoAggressive="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/VR-DeEchoAggressive.pth"48dlVR_DeEchoDeReverb="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/VR-DeEchoDeReverb.pth"49dlVR_DeEchoNormal="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/VR-DeEchoNormal.pth"50dlonnx_dereverb="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/onnx_dereverb_By_FoxJoy/vocals.onnx"51dlrmvpe="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt"52 53hb="hubert_base.pt"54 55dlhb="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt"56 57echo dir check start.58 59if [ -d "./assets/pretrained" ]; then60    echo dir ./assets/pretrained checked.61else62    echo failed. generating dir ./assets/pretrained.63    mkdir pretrained64fi65 66if [ -d "./assets/pretrained_v2" ]; then67    echo dir ./assets/pretrained_v2 checked.68else69    echo failed. generating dir ./assets/pretrained_v2.70    mkdir pretrained_v271fi72 73if [ -d "./assets/uvr5_weights" ]; then74    echo dir ./assets/uvr5_weights checked.75else76    echo failed. generating dir ./assets/uvr5_weights.77    mkdir uvr5_weights78fi79 80if [ -d "./assets/uvr5_weights/onnx_dereverb_By_FoxJoy" ]; then81    echo dir ./assets/uvr5_weights/onnx_dereverb_By_FoxJoy checked.82else83    echo failed. generating dir ./assets/uvr5_weights/onnx_dereverb_By_FoxJoy.84    mkdir uvr5_weights/onnx_dereverb_By_FoxJoy85fi86 87echo dir check finished.88 89echo required files check start.90 91echo checking D32k.pth92if [ -f "./assets/pretrained/D32k.pth" ]; then93    echo D32k.pth in ./assets/pretrained checked.94else95    echo failed. starting download from huggingface.96    if command -v aria2c &> /dev/null; then97        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D32k.pth -d ./assets/pretrained -o D32k.pth98        if [ -f "./assets/pretrained/D32k.pth" ]; then99            echo download successful.100        else101            echo please try again!102            exit 1103        fi104    else105        echo aria2c command not found. Please install aria2c and try again.106        exit 1107    fi108fi109 110echo checking D40k.pth111if [ -f "./assets/pretrained/D40k.pth" ]; then112    echo D40k.pth in ./assets/pretrained checked.113else114    echo failed. starting download from huggingface.115    if command -v aria2c &> /dev/null; then116        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D40k.pth -d ./assets/pretrained -o D40k.pth117        if [ -f "./assets/pretrained/D40k.pth" ]; then118            echo download successful.119        else120            echo please try again!121            exit 1122        fi123    else124        echo aria2c command not found. Please install aria2c and try again.125        exit 1126    fi127fi128 129echo checking D40k.pth130if [ -f "./assets/pretrained_v2/D40k.pth" ]; then131    echo D40k.pth in ./assets/pretrained_v2 checked.132else133    echo failed. starting download from huggingface.134    if command -v aria2c &> /dev/null; then135        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D40k.pth -d ./assets/pretrained_v2 -o D40k.pth136        if [ -f "./assets/pretrained_v2/D40k.pth" ]; then137            echo download successful.138        else139            echo please try again!140            exit 1141        fi142    else143        echo aria2c command not found. Please install aria2c and try again.144        exit 1145    fi146fi147 148echo checking D48k.pth149if [ -f "./assets/pretrained/D48k.pth" ]; then150    echo D48k.pth in ./assets/pretrained checked.151else152    echo failed. starting download from huggingface.153    if command -v aria2c &> /dev/null; then154        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D48k.pth -d ./assets/pretrained -o D48k.pth155        if [ -f "./assets/pretrained/D48k.pth" ]; then156            echo download successful.157        else158            echo please try again!159            exit 1160        fi161    else162        echo aria2c command not found. Please install aria2c and try again.163        exit 1164    fi165fi166 167echo checking G32k.pth168if [ -f "./assets/pretrained/G32k.pth" ]; then169    echo G32k.pth in ./assets/pretrained checked.170else171    echo failed. starting download from huggingface.172    if command -v aria2c &> /dev/null; then173        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G32k.pth -d ./assets/pretrained -o G32k.pth174        if [ -f "./assets/pretrained/G32k.pth" ]; then175            echo download successful.176        else177            echo please try again!178            exit 1179        fi180    else181        echo aria2c command not found. Please install aria2c and try again.182        exit 1183    fi184fi185 186echo checking G40k.pth187if [ -f "./assets/pretrained/G40k.pth" ]; then188    echo G40k.pth in ./assets/pretrained checked.189else190    echo failed. starting download from huggingface.191    if command -v aria2c &> /dev/null; then192        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G40k.pth -d ./assets/pretrained -o G40k.pth193        if [ -f "./assets/pretrained/G40k.pth" ]; then194            echo download successful.195        else196            echo please try again!197            exit 1198        fi199    else200        echo aria2c command not found. Please install aria2c and try again.201        exit 1202    fi203fi204 205echo checking G40k.pth206if [ -f "./assets/pretrained_v2/G40k.pth" ]; then207    echo G40k.pth in ./assets/pretrained_v2 checked.208else209    echo failed. starting download from huggingface.210    if command -v aria2c &> /dev/null; then211        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/G40k.pth -d ./assets/pretrained_v2 -o G40k.pth212        if [ -f "./assets/pretrained_v2/G40k.pth" ]; then213            echo download successful.214        else215            echo please try again!216            exit 1217        fi218    else219        echo aria2c command not found. Please install aria2c and try again.220        exit 1221    fi222fi223 224echo checking G48k.pth225if [ -f "./assets/pretrained/G48k.pth" ]; then226    echo G48k.pth in ./assets/pretrained checked.227else228    echo failed. starting download from huggingface.229    if command -v aria2c &> /dev/null; then230        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G48k.pth -d ./assets/pretrained -o G48k.pth231        if [ -f "./assets/pretrained/G48k.pth" ]; then232            echo download successful.233        else234            echo please try again!235            exit 1236        fi237    else238        echo aria2c command not found. Please install aria2c and try again.239        exit 1240    fi241fi242 243echo checking $d32244if [ -f "./assets/pretrained/$d32" ]; then245    echo $d32 in ./assets/pretrained checked.246else247    echo failed. starting download from huggingface.248    if command -v aria2c &> /dev/null; then249        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dld32 -d ./assets/pretrained -o $d32250        if [ -f "./assets/pretrained/$d32" ]; then251            echo download successful.252        else253            echo please try again!254            exit 1255        fi256    else257        echo aria2c command not found. Please install aria2c and try again.258        exit 1259    fi260fi261 262echo checking $d40263if [ -f "./assets/pretrained/$d40" ]; then264    echo $d40 in ./assets/pretrained checked.265else266    echo failed. starting download from huggingface.267    if command -v aria2c &> /dev/null; then268        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dld40 -d ./assets/pretrained -o $d40269        if [ -f "./assets/pretrained/$d40" ]; then270            echo download successful.271        else272            echo please try again!273            exit 1274        fi275    else276        echo aria2c command not found. Please install aria2c and try again.277        exit 1278    fi279fi280 281echo checking $d40v2282if [ -f "./assets/pretrained_v2/$d40v2" ]; then283    echo $d40v2 in ./assets/pretrained_v2 checked.284else285    echo failed. starting download from huggingface.286    if command -v aria2c &> /dev/null; then287        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dld40v2 -d ./assets/pretrained_v2 -o $d40v2288        if [ -f "./assets/pretrained_v2/$d40v2" ]; then289            echo download successful.290        else291            echo please try again!292            exit 1293        fi294    else295        echo aria2c command not found. Please install aria2c and try again.296        exit 1297    fi298fi299 300echo checking $d48301if [ -f "./assets/pretrained/$d48" ]; then302    echo $d48 in ./assets/pretrained checked.303else304    echo failed. starting download from huggingface.305    if command -v aria2c &> /dev/null; then306        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dld48 -d ./assets/pretrained -o $d48307        if [ -f "./assets/pretrained/$d48" ]; then308            echo download successful.309        else310            echo please try again!311            exit 1312        fi313    else314        echo aria2c command not found. Please install aria2c and try again.315        exit 1316    fi317fi318 319echo checking $g32320if [ -f "./assets/pretrained/$g32" ]; then321    echo $g32 in ./assets/pretrained checked.322else323    echo failed. starting download from huggingface.324    if command -v aria2c &> /dev/null; then325        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlg32 -d ./assets/pretrained -o $g32326        if [ -f "./assets/pretrained/$g32" ]; then327            echo download successful.328        else329            echo please try again!330            exit 1331        fi332    else333        echo aria2c command not found. Please install aria2c and try again.334        exit 1335    fi336fi337 338echo checking $g40339if [ -f "./assets/pretrained/$g40" ]; then340    echo $g40 in ./assets/pretrained checked.341else342    echo failed. starting download from huggingface.343    if command -v aria2c &> /dev/null; then344        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlg40 -d ./assets/pretrained -o $g40345        if [ -f "./assets/pretrained/$g40" ]; then346            echo download successful.347        else348            echo please try again!349            exit 1350        fi351    else352        echo aria2c command not found. Please install aria2c and try again.353        exit 1354    fi355fi356 357echo checking $g40v2358if [ -f "./assets/pretrained_v2/$g40v2" ]; then359    echo $g40v2 in ./assets/pretrained_v2 checked.360else361    echo failed. starting download from huggingface.362    if command -v aria2c &> /dev/null; then363        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlg40v2 -d ./assets/pretrained_v2 -o $g40v2364        if [ -f "./assets/pretrained_v2/$g40v2" ]; then365            echo download successful.366        else367            echo please try again!368            exit 1369        fi370    else371        echo aria2c command not found. Please install aria2c and try again.372        exit 1373    fi374fi375 376echo checking $g48377if [ -f "./assets/pretrained/$g48" ]; then378    echo $g48 in ./assets/pretrained checked.379else380    echo failed. starting download from huggingface.381    if command -v aria2c &> /dev/null; then382        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlg48 -d ./assets/pretrained -o $g48383        if [ -f "./assets/pretrained/$g48" ]; then384            echo download successful.385        else386            echo please try again!387            exit 1388        fi389    else390        echo aria2c command not found. Please install aria2c and try again.391        exit 1392    fi393fi394 395echo checking $hp2_all396if [ -f "./assets/uvr5_weights/$hp2_all" ]; then397    echo $hp2_all in ./assets/uvr5_weights checked.398else399    echo failed. starting download from huggingface.400    if command -v aria2c &> /dev/null; then401        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlhp2_all -d ./assets/uvr5_weights -o $hp2_all402        if [ -f "./assets/uvr5_weights/$hp2_all" ]; then403            echo download successful.404        else405            echo please try again!406            exit 1407        fi408    else409        echo aria2c command not found. Please install aria2c and try again.410        exit 1411    fi412fi413 414echo checking $hp3_all415if [ -f "./assets/uvr5_weights/$hp3_all" ]; then416    echo $hp3_all in ./assets/uvr5_weights checked.417else418    echo failed. starting download from huggingface.419    if command -v aria2c &> /dev/null; then420        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlhp3_all -d ./assets/uvr5_weights -o $hp3_all421        if [ -f "./assets/uvr5_weights/$hp3_all" ]; then422            echo download successful.423        else424            echo please try again!425            exit 1426        fi427    else428        echo aria2c command not found. Please install aria2c and try again.429        exit 1430    fi431fi432 433echo checking $hp5_only434if [ -f "./assets/uvr5_weights/$hp5_only" ]; then435    echo $hp5_only in ./assets/uvr5_weights checked.436else437    echo failed. starting download from huggingface.438    if command -v aria2c &> /dev/null; then439        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlhp5_only -d ./assets/uvr5_weights -o $hp5_only440        if [ -f "./assets/uvr5_weights/$hp5_only" ]; then441            echo download successful.442        else443            echo please try again!444            exit 1445        fi446    else447        echo aria2c command not found. Please install aria2c and try again.448        exit 1449    fi450fi451 452echo checking $VR_DeEchoAggressive453if [ -f "./assets/uvr5_weights/$VR_DeEchoAggressive" ]; then454    echo $VR_DeEchoAggressive in ./assets/uvr5_weights checked.455else456    echo failed. starting download from huggingface.457    if command -v aria2c &> /dev/null; then458        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlVR_DeEchoAggressive -d ./assets/uvr5_weights -o $VR_DeEchoAggressive459        if [ -f "./assets/uvr5_weights/$VR_DeEchoAggressive" ]; then460            echo download successful.461        else462            echo please try again!463            exit 1464        fi465    else466        echo aria2c command not found. Please install aria2c and try again.467        exit 1468    fi469fi470 471echo checking $VR_DeEchoDeReverb472if [ -f "./assets/uvr5_weights/$VR_DeEchoDeReverb" ]; then473    echo $VR_DeEchoDeReverb in ./assets/uvr5_weights checked.474else475    echo failed. starting download from huggingface.476    if command -v aria2c &> /dev/null; then477        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlVR_DeEchoDeReverb -d ./assets/uvr5_weights -o $VR_DeEchoDeReverb478        if [ -f "./assets/uvr5_weights/$VR_DeEchoDeReverb" ]; then479            echo download successful.480        else481            echo please try again!482            exit 1483        fi484    else485        echo aria2c command not found. Please install aria2c and try again.486        exit 1487    fi488fi489 490echo checking $VR_DeEchoNormal491if [ -f "./assets/uvr5_weights/$VR_DeEchoNormal" ]; then492    echo $VR_DeEchoNormal in ./assets/uvr5_weights checked.493else494    echo failed. starting download from huggingface.495    if command -v aria2c &> /dev/null; then496        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlVR_DeEchoNormal -d ./assets/uvr5_weights -o $VR_DeEchoNormal497        if [ -f "./assets/uvr5_weights/$VR_DeEchoNormal" ]; then498            echo download successful.499        else500            echo please try again!501            exit 1502        fi503    else504        echo aria2c command not found. Please install aria2c and try again.505        exit 1506    fi507fi508 509echo checking $onnx_dereverb510if [ -f "./assets/uvr5_weights/onnx_dereverb_By_FoxJoy/$onnx_dereverb" ]; then511    echo $onnx_dereverb in ./assets/uvr5_weights/onnx_dereverb_By_FoxJoy checked.512else513    echo failed. starting download from huggingface.514    if command -v aria2c &> /dev/null; then515        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlonnx_dereverb -d ./assets/uvr5_weights/onnx_dereverb_By_FoxJoy -o $onnx_dereverb516        if [ -f "./assets/uvr5_weights/onnx_dereverb_By_FoxJoy/$onnx_dereverb" ]; then517            echo download successful.518        else519            echo please try again!520            exit 1521        fi522    else523        echo aria2c command not found. Please install aria2c and try again.524        exit 1525    fi526fi527 528echo checking $rmvpe529if [ -f "./assets/rmvpe/$rmvpe" ]; then530    echo $rmvpe in ./assets/rmvpe checked.531else532    echo failed. starting download from huggingface.533    if command -v aria2c &> /dev/null; then534        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlrmvpe -d ./assets/rmvpe -o $rmvpe535        if [ -f "./assets/rmvpe/$rmvpe" ]; then536            echo download successful.537        else538            echo please try again!539            exit 1540        fi541    else542        echo aria2c command not found. Please install aria2c and try again.543        exit 1544    fi545fi546 547echo checking $hb548if [ -f "./assets/hubert/$hb" ]; then549    echo $hb in ./assets/hubert/pretrained checked.550else551    echo failed. starting download from huggingface.552    if command -v aria2c &> /dev/null; then553        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlhb -d ./assets/hubert/ -o $hb554        if [ -f "./assets/hubert/$hb" ]; then555            echo download successful.556        else557            echo please try again!558            exit 1559        fi560    else561        echo aria2c command not found. Please install aria2c and try again.562        exit 1563    fi564fi565 566echo required files check finished.567