mosibi/RVC_HFv2
0
1@echo off2title Applio Installer3 4::: _ _ _____ _ 5::: /\ | (_) | __ \ | | 6::: / \ _ __ _ __ | |_ ___ | |__) |___ ___ ___ __| | ___ 7::: / /\ \ | '_ \| '_ \| | |/ _ \ | _ // _ \/ __/ _ \ / _` |/ _ \8::: / ____ \| |_) | |_) | | | (_) | | | \ \ __/ (_| (_) | (_| | __/9::: /_/ \_\ .__/| .__/|_|_|\___/ |_| \_\___|\___\___/ \__,_|\___|10::: | | | | 11::: |_| |_| 12:::13:::14 15setlocal 16set "branch=applio-recode"17set "runtime=runtime-recode"18set "repoUrl=https://github.com/IAHispano/Applio-RVC-Fork/archive/refs/heads/%branch%.zip"19set "fixesFolder=fixes"20set "localFixesPy=local_fixes.py"21set "principal=%cd%"22set "URL_BASE=https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main"23set "URL_EXTRA=https://huggingface.co/IAHispano/applio/resolve/main"24 25:menu26for /f "delims=: tokens=*" %%A in ('findstr /b ":::" "%~f0"') do @echo(%%A27 28echo [1] Reinstall Applio29echo [2] Update Applio30echo [3] Update Applio + Runtime31echo.32 33set /p choice=Select an option: 34set choice=%choice: =%35 36if "%choice%"=="1" (37 cls38 echo Starting Applio Reinstaller...39 echo.40 goto reinstaller41 pause42 cls43 goto menu44 45)46 47if "%choice%"=="2" (48 cls49 echo Starting Applio Updater...50 echo.51 goto updater52 pause53 cls54 goto menu55)56 57if "%choice%"=="3" (58 cls59 echo Updating Applio + Runtime...60 echo.61 goto updaterRuntime62 pause63 cls64 goto menu65 66)67 68cls69echo Invalid option. Please enter a number from 1 to 3.70echo.71echo Press 'Enter' to access the main menu...72pause>nul73cls74goto menu75 76:reinstaller77 78echo WARNING: Remember to install Microsoft C++ Build Tools, Redistributable, Python, and Git before continuing.79echo.80echo Step-by-step guide: https://rentry.org/appliolocal81echo Build Tools: https://aka.ms/vs/17/release/vs_BuildTools.exe82echo Redistributable: https://aka.ms/vs/17/release/vc_redist.x64.exe83echo Git: https://github.com/git-for-windows/git/releases/download/v2.42.0.windows.2/Git-2.42.0.2-64-bit.exe84echo Python: Add this route to the windows enviroment variables the user path variable: %principal%\runtime\Scripts85echo.86pause87cls88 89echo Downloading ZIP file...90powershell -command "& { Invoke-WebRequest -Uri '%repoUrl%' -OutFile '%principal%\repo.zip' }"91echo.92 93echo Extracting ZIP file...94powershell -command "& { Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory('%principal%\repo.zip', '%principal%') }"95echo.96 97echo Copying folder and file structure from subdirectory to main directory...98robocopy "%principal%\Applio-RVC-Fork-%branch%" "%principal%" /E99echo.100 101echo Deleting contents of subdirectory (files and folders)...102rmdir "%principal%\Applio-RVC-Fork-%branch%" /S /Q103echo.104 105echo Cleaning up...106del "%principal%\repo.zip"107echo.108cls109 110echo Proceeding to download the models...111echo.112 113echo WARNING: At this point, it's recommended to disable antivirus or firewall, as errors might occur when downloading pretrained models.114pause115cls116 117echo Downloading models in the assets folder...118cd "assets"119echo.120echo Downloading the "pretrained" folder...121cd "pretrained"122curl -LJO "%URL_BASE%/pretrained/D32k.pth"123curl -LJO "%URL_BASE%/pretrained/D40k.pth"124curl -LJO "%URL_BASE%/pretrained/D48k.pth"125curl -LJO "%URL_BASE%/pretrained/G32k.pth"126curl -LJO "%URL_BASE%/pretrained/G40k.pth"127curl -LJO "%URL_BASE%/pretrained/G48k.pth"128curl -LJO "%URL_BASE%/pretrained/f0D32k.pth"129curl -LJO "%URL_BASE%/pretrained/f0D40k.pth"130curl -LJO "%URL_BASE%/pretrained/f0D48k.pth"131curl -LJO "%URL_BASE%/pretrained/f0G32k.pth"132curl -LJO "%URL_BASE%/pretrained/f0G40k.pth"133curl -LJO "%URL_BASE%/pretrained/f0G48k.pth"134cd ".."135echo.136cls137 138echo Downloading the "pretrained_v2" folder...139cd "pretrained_v2"140curl -LJO "%URL_BASE%/pretrained_v2/D32k.pth"141curl -LJO "%URL_BASE%/pretrained_v2/D40k.pth"142curl -LJO "%URL_BASE%/pretrained_v2/D48k.pth"143curl -LJO "%URL_BASE%/pretrained_v2/G32k.pth"144curl -LJO "%URL_BASE%/pretrained_v2/G40k.pth"145curl -LJO "%URL_BASE%/pretrained_v2/G48k.pth"146curl -LJO "%URL_BASE%/pretrained_v2/f0D32k.pth"147curl -LJO "%URL_BASE%/pretrained_v2/f0D40k.pth"148curl -LJO "%URL_BASE%/pretrained_v2/f0D48k.pth"149curl -LJO "%URL_BASE%/pretrained_v2/f0G32k.pth"150curl -LJO "%URL_BASE%/pretrained_v2/f0G40k.pth"151curl -LJO "%URL_BASE%/pretrained_v2/f0G48k.pth"152cd ".."153echo.154cls155 156echo Downloading the hubert_base.pt file...157cd "hubert"158curl -LJO "%URL_BASE%/hubert_base.pt"159cd ".."160echo.161cls162 163 164echo Downloading the rmvpe.pt file...165cd "rmvpe"166curl -LJO "%URL_BASE%/rmvpe.pt"167echo.168cls169 170echo Downloading the rmvpe.onnx file...171curl -LJO "%URL_BASE%/rmvpe.onnx"172cd ".."173cd ".."174echo.175cls176 177echo Downloading the rest of the large files178 179echo Downloading the "uvr5_weights" folder...180cd "uvr5_weights"181curl -LJO "%URL_BASE%/uvr5_weights/HP2_all_vocals.pth"182curl -LJO "%URL_BASE%/uvr5_weights/HP3_all_vocals.pth"183curl -LJO "%URL_BASE%/uvr5_weights/HP5_only_main_vocal.pth"184curl -LJO "%URL_BASE%/uvr5_weights/VR-DeEchoAggressive.pth"185curl -LJO "%URL_BASE%/uvr5_weights/VR-DeEchoDeReverb.pth"186curl -LJO "%URL_BASE%/uvr5_weights/VR-DeEchoNormal.pth"187cd ".."188echo.189cls190 191echo Downloading the ffmpeg.exe file...192curl -LJO "%URL_BASE%/ffmpeg.exe"193echo.194cls195 196echo Downloading the ffprobe.exe file...197curl -LJO "%URL_BASE%/ffprobe.exe"198echo.199cls200 201echo Downloading the runtime.zip file...202curl -LJO "%URL_EXTRA%/%runtime%.zip"203echo.204cls205 206echo Extracting the runtime.zip file, this might take a while...207powershell -Command "Expand-Archive -Path '%runtime%.zip' -DestinationPath '.'"208del %runtime%.zip209echo.210cls211 212echo Downloads completed!213echo.214 215echo Checking if the local_fixes.py file exists in the Fixes folder...216if exist "%fixesFolder%\%localFixesPy%" (217 echo Running the file...218 runtime\python.exe "%fixesFolder%\%localFixesPy%"219) else (220 echo The "%localFixesPy%" file was not found in the "Fixes" folder.221)222echo.223 224echo Fixes Applied!225echo.226 227echo Applio has been reinstalled!228echo.229echo Press 'Enter' to access the main menu...230pause>nul231cls232goto menu233 234 235:updater236 237echo Downloading the ZIP file...238powershell -command "& { Invoke-WebRequest -Uri '%repoUrl%' -OutFile '%principal%\repo.zip' }"239echo.240 241echo Extracting ZIP file...242powershell -command "& { Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory('%principal%\repo.zip', '%principal%') }"243echo.244 245echo Copying folder and file structure from subdirectory to main directory...246robocopy "%principal%\Applio-RVC-Fork-%branch%" "%principal%" /E247echo.248 249echo Deleting contents of the subdirectory (files and folders)...250rmdir "%principal%\Applio-RVC-Fork-%branch%" /S /Q251echo.252 253echo Cleaning up...254del "%principal%\repo.zip"255echo.256cls257 258echo Verifying if the local_fixes.py file exists in the Fixes folder...259if exist "%fixesFolder%\%localFixesPy%" (260 echo Running the file...261 runtime\python.exe "%fixesFolder%\%localFixesPy%"262) else (263 echo The file "%localFixesPy%" was not found in the "Fixes" folder.264)265echo.266 267echo Applio has been updated!268echo.269echo Press 'Enter' to access the main menu... 270pause>nul271cls272goto menu273 274 275:updaterRuntime276 277echo Downloading the ZIP file...278powershell -command "& { Invoke-WebRequest -Uri '%repoUrl%' -OutFile '%principal%\repo.zip' }"279echo.280 281echo Extracting ZIP file...282powershell -command "& { Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory('%principal%\repo.zip', '%principal%') }"283echo.284 285echo Copying folder and file structure from subdirectory to main directory...286robocopy "%principal%\Applio-RVC-Fork-%branch%" "%principal%" /E287echo.288 289echo Deleting contents of the subdirectory (files and folders)...290rmdir "%principal%\Applio-RVC-Fork-%branch%" /S /Q291echo.292 293echo Cleaning up...294del "%principal%\repo.zip"295echo.296cls297 298echo Downloading the runtime.zip file...299curl -LJO "%URL_EXTRA%/%runtime%.zip"300echo.301cls302echo Extracting the runtime.zip file, this might take a while...303powershell -Command "Expand-Archive -Path '%runtime%.zip' -DestinationPath '.'"304del runtime.zip305echo.306cls307 308echo Verifying if the local_fixes.py file exists in the Fixes folder...309if exist "%fixesFolder%\%localFixesPy%" (310 echo Running the file...311 runtime\python.exe "%fixesFolder%\%localFixesPy%"312) else (313 echo The file "%localFixesPy%" was not found in the "Fixes" folder.314)315echo.316 317echo Applio has been updated!318echo.319echo Press 'Enter' to access the main menu...320pause>nul321cls322goto menu323 