From dcf4dd8cf2466496dad6a0c480bca02e5f36d724 Mon Sep 17 00:00:00 2001 From: litagin02 Date: Wed, 27 Dec 2023 10:03:06 +0900 Subject: [PATCH] Remove all .bat files for re-creation --- App.bat | 9 ---- Style.bat | 10 ---- Train.bat | 10 ---- scripts/Install-Style-Bert-VITS2.bat | 33 ------------ scripts/Setup-Python.bat | 76 ---------------------------- scripts/Setup.bat | 48 ------------------ 6 files changed, 186 deletions(-) delete mode 100644 App.bat delete mode 100644 Style.bat delete mode 100644 Train.bat delete mode 100644 scripts/Install-Style-Bert-VITS2.bat delete mode 100644 scripts/Setup-Python.bat delete mode 100644 scripts/Setup.bat diff --git a/App.bat b/App.bat deleted file mode 100644 index 7867d59..0000000 --- a/App.bat +++ /dev/null @@ -1,9 +0,0 @@ -chcp 65001 > NUL -@echo off - -echo Running app.py... -venv\Scripts\python app.py - -if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - -pause \ No newline at end of file diff --git a/Style.bat b/Style.bat deleted file mode 100644 index 54c2abb..0000000 --- a/Style.bat +++ /dev/null @@ -1,10 +0,0 @@ -chcp 65001 > NUL - -@echo off - -echo Running webui_style_vectors.py... -venv\Scripts\python webui_style_vectors.py - -if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - -pause \ No newline at end of file diff --git a/Train.bat b/Train.bat deleted file mode 100644 index 9a6d4c5..0000000 --- a/Train.bat +++ /dev/null @@ -1,10 +0,0 @@ -chcp 65001 > NUL - -@echo off - -echo Running webui_train.py... -venv\Scripts\python webui_train.py - -if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - -pause \ No newline at end of file diff --git a/scripts/Install-Style-Bert-VITS2.bat b/scripts/Install-Style-Bert-VITS2.bat deleted file mode 100644 index bfeb09d..0000000 --- a/scripts/Install-Style-Bert-VITS2.bat +++ /dev/null @@ -1,33 +0,0 @@ -chcp 65001 > NUL - -@REM https://github.com/Zuntan03/EasyBertVits2 より引用・改変 - -@echo off -pushd %~dp0 -set PS_CMD=PowerShell -Version 5.1 -ExecutionPolicy Bypass - -set CURL_CMD=C:\Windows\System32\curl.exe -if not exist %CURL_CMD% ( - echo [ERROR] %CURL_CMD% が見つかりません。 - pause & popd & exit /b 1 -) - -if not exist lib\ ( mkdir lib ) - -%CURL_CMD% -Lo Style-Bert-VITS2.zip^ - https://github.com/litagin02/Style-Bert-VITS2/archive/refs/heads/main.zip -if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - -%PS_CMD% Expand-Archive -Path Style-Bert-VITS2.zip -DestinationPath . -Force -if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - -del lib\Style-Bert-VITS2.zip -if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - -xcopy /QSY .\lib\%STYLE_BERT_VITS2_DIR%\scripts . - -call src\Setup.bat - -popd - -pause diff --git a/scripts/Setup-Python.bat b/scripts/Setup-Python.bat deleted file mode 100644 index 17fd23f..0000000 --- a/scripts/Setup-Python.bat +++ /dev/null @@ -1,76 +0,0 @@ -chcp 65001 > NUL - -@REM https://github.com/Zuntan03/EasyBertVits2 より引用・改変 - -@echo off -set PS_CMD=PowerShell -Version 5.1 -ExecutionPolicy Bypass -set CURL_CMD=C:\Windows\System32\curl.exe - -if not exist %CURL_CMD% ( - echo [ERROR] %CURL_CMD% が見つかりません。 - pause & exit /b 1 -) - -if "%1" neq "" ( - set PYTHON_DIR=%~dp0%~1 -) else ( - set PYTHON_DIR=%~dp0python -) -set PYTHON_CMD=%PYTHON_DIR%\python.exe - -if "%2" neq "" ( - set VENV_DIR=%~dp0%~2 -) else ( - set VENV_DIR=%~dp0venv -) - -echo PS_CMD: %PS_CMD% -echo CURL_CMD: %CURL_CMD% -echo PYTHON_CMD: %PYTHON_CMD% -echo VENV_DIR: %VENV_DIR% - -if not exist %PYTHON_DIR%\ ( - echo https://www.python.org/ - echo %CURL_CMD% -o python.zip https://www.python.org/ftp/python/3.10.11/python-3.10.11-embed-amd64.zip - %CURL_CMD% -o python.zip https://www.python.org/ftp/python/3.10.11/python-3.10.11-embed-amd64.zip - if %errorlevel% neq 0 ( pause & exit /b %errorlevel% ) - - echo %PS_CMD% Expand-Archive -Path python.zip -DestinationPath %PYTHON_DIR% - %PS_CMD% Expand-Archive -Path python.zip -DestinationPath %PYTHON_DIR% - if %errorlevel% neq 0 ( pause & exit /b %errorlevel% ) - - echo del python.zip - del python.zip - if %errorlevel% neq 0 ( pause & exit /b %errorlevel% ) - - echo %PS_CMD% "&{(Get-Content '%PYTHON_DIR%/python310._pth') -creplace '#import site', 'import site' | Set-Content '%PYTHON_DIR%/python310._pth' }" - %PS_CMD% "&{(Get-Content '%PYTHON_DIR%/python310._pth') -creplace '#import site', 'import site' | Set-Content '%PYTHON_DIR%/python310._pth' }" - if %errorlevel% neq 0 ( pause & exit /b %errorlevel% ) - - echo https://github.com/pypa/get-pip - echo %CURL_CMD% -o %PYTHON_DIR%\get-pip.py https://bootstrap.pypa.io/get-pip.py - %CURL_CMD% -o %PYTHON_DIR%\get-pip.py https://bootstrap.pypa.io/get-pip.py - if %errorlevel% neq 0 ( pause & exit /b %errorlevel% ) - - echo %PYTHON_CMD% %PYTHON_DIR%\get-pip.py --no-warn-script-location - %PYTHON_CMD% %PYTHON_DIR%\get-pip.py --no-warn-script-location - if %errorlevel% neq 0 ( pause & exit /b %errorlevel% ) - - echo %PYTHON_CMD% -m pip install virtualenv --no-warn-script-location - %PYTHON_CMD% -m pip install virtualenv --no-warn-script-location - if %errorlevel% neq 0 ( pause & exit /b %errorlevel% ) -) - -if not exist %VENV_DIR%\ ( - echo %PYTHON_CMD% -m virtualenv --copies %VENV_DIR% - %PYTHON_CMD% -m virtualenv --copies %VENV_DIR% - if %errorlevel% neq 0 ( pause & exit /b %errorlevel% ) -) - -echo call %VENV_DIR%\Scripts\activate.bat -call %VENV_DIR%\Scripts\activate.bat -if %errorlevel% neq 0 ( pause & exit /b %errorlevel% ) - -echo python -m pip install --upgrade pip -python -m pip install --upgrade pip -if %errorlevel% neq 0 ( pause & exit /b %errorlevel% ) diff --git a/scripts/Setup.bat b/scripts/Setup.bat deleted file mode 100644 index 5a3c1d3..0000000 --- a/scripts/Setup.bat +++ /dev/null @@ -1,48 +0,0 @@ -chcp 65001 > NUL - -@REM https://github.com/Zuntan03/EasyBertVits2 より引用・改変 - -@echo off -pushd %~dp0.. -set PS_CMD=PowerShell -Version 5.1 -ExecutionPolicy Bypass - -set CURL_CMD=C:\Windows\System32\curl.exe -if not exist %CURL_CMD% ( - echo [ERROR] %CURL_CMD% が見つかりません。 - pause & popd & exit /b 1 -) - -echo 以下の配布元から関連ファイルをダウンロードして使用します(URL を Ctrl + クリックで開けます)。 -echo https://www.python.org/ -echo https://github.com/pypa/get-pip -echo https://github.com/litagin02/Style-Bert-VITS2/ -echo よろしいですか? [y/n] -set /p YES_OR_NO= -if /i not "%YES_OR_NO%" == "y" ( popd & exit /b 1 ) - -if not exist lib\ ( mkdir lib ) - -if not exist Style-Bert-VITS2\ ( - %CURL_CMD% -Lo Style-Bert-VITS2.zip https://github.com/litagin02/Style-Bert-VITS2/archive/refs/heads/master.zip - if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - - %PS_CMD% Expand-Archive -Path Style-Bert-VITS2.zip -DestinationPath . -Force - if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - - del Style-Bert-VITS2.zip - if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) -) - -call %~dp0Setup-Python.bat ..\lib\python ..\Bert-VITS2\venv -if %errorlevel% neq 0 ( popd & exit /b %errorlevel% ) - -pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 -if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - -pip install -r Bert-VITS2\requirements.txt -if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - -pushd Bert-VITS2 -python initialize.py - -popd