Remove debug pause
This commit is contained in:
@@ -31,7 +31,6 @@ echo --------------------------------------------------
|
||||
echo Checking Git Installation...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: git --version
|
||||
pause
|
||||
git --version
|
||||
if !errorlevel! neq 0 (
|
||||
echo --------------------------------------------------
|
||||
|
||||
@@ -31,7 +31,6 @@ echo --------------------------------------------------
|
||||
echo Checking Git Installation...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: git --version
|
||||
pause
|
||||
git --version
|
||||
if !errorlevel! neq 0 (
|
||||
echo --------------------------------------------------
|
||||
|
||||
@@ -30,8 +30,6 @@ if !errorlevel! neq 0 (
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
)
|
||||
|
||||
pause
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Git pull...
|
||||
echo --------------------------------------------------
|
||||
|
||||
124
scripts/sbv2/Install-Style-Bert-VITS2-CPU.bat
Normal file
124
scripts/sbv2/Install-Style-Bert-VITS2-CPU.bat
Normal file
@@ -0,0 +1,124 @@
|
||||
chcp 65001 > NUL
|
||||
@echo off
|
||||
|
||||
@REM エラーコードを遅延評価するために設定
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
@REM PowerShellのコマンド
|
||||
set PS_CMD=PowerShell -NoProfile -NoLogo -ExecutionPolicy Bypass
|
||||
|
||||
@REM PortableGitのURLと保存先
|
||||
set DL_URL=https://github.com/git-for-windows/git/releases/download/v2.44.0.windows.1/PortableGit-2.44.0-64-bit.7z.exe
|
||||
set DL_DST=%~dp0lib\PortableGit-2.44.0-64-bit.7z.exe
|
||||
|
||||
@REM Style-Bert-VITS2のリポジトリURL
|
||||
set REPO_URL=https://github.com/litagin02/Style-Bert-VITS2
|
||||
|
||||
@REM カレントディレクトリをbatファイルのディレクトリに変更
|
||||
pushd %~dp0
|
||||
|
||||
@REM lib フォルダがなければ作成
|
||||
if not exist lib\ ( mkdir lib )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo PS_CMD: %PS_CMD%
|
||||
echo DL_URL: %DL_URL%
|
||||
echo DL_DST: %DL_DST%
|
||||
echo REPO_URL: %REPO_URL%
|
||||
echo --------------------------------------------------
|
||||
echo.
|
||||
echo --------------------------------------------------
|
||||
echo Checking Git Installation...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: git --version
|
||||
pause
|
||||
git --version
|
||||
if !errorlevel! neq 0 (
|
||||
echo --------------------------------------------------
|
||||
echo Git is not installed, so download and use PortableGit.
|
||||
echo Downloading PortableGit...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: curl -L %DL_URL% -o "%DL_DST%"
|
||||
curl -L %DL_URL% -o "%DL_DST%"
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Extracting PortableGit...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: "%DL_DST%" -y
|
||||
"%DL_DST%" -y
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Removing %DL_DST%...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: del "%DL_DST%"
|
||||
del "%DL_DST%"
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
@REM Gitコマンドのパスを設定
|
||||
echo --------------------------------------------------
|
||||
echo Setting up PATH...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: set "PATH=%~dp0lib\PortableGit\bin;%PATH%"
|
||||
set "PATH=%~dp0lib\PortableGit\bin;%PATH%"
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Checking Git Installation...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: git --version
|
||||
git --version
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
)
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Cloning repository...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: git clone %REPO_URL%
|
||||
git clone %REPO_URL%
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
@REM Pythonのセットアップ、仮想環境が有効化されて戻って来る
|
||||
echo --------------------------------------------------
|
||||
echo Setting up Python environment...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: call Setup-Python.bat ".\lib\python" ".\Style-Bert-VITS2\venv"
|
||||
call Setup-Python.bat ".\lib\python" ".\Style-Bert-VITS2\venv"
|
||||
if !errorlevel! neq 0 ( popd & exit /b !errorlevel! )
|
||||
|
||||
@REM Style-Bert-VITS2フォルダに移動
|
||||
pushd Style-Bert-VITS2
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Activating the virtual environment...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: call ".\venv\Scripts\activate.bat"
|
||||
call ".\venv\Scripts\activate.bat"
|
||||
if !errorlevel! neq 0 ( popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Installing dependencies...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: pip install -r requirements.txt
|
||||
pip install -r requirements.txt
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo ----------------------------------------
|
||||
echo Environment setup is complete. Start downloading the model.
|
||||
echo ----------------------------------------
|
||||
echo Executing: python initialize.py
|
||||
python initialize.py --only_infer
|
||||
|
||||
echo ----------------------------------------
|
||||
echo Model download is complete. Start Style-Bert-VITS2 Editor.
|
||||
echo ----------------------------------------
|
||||
echo Executing: python server_editor.py --inbrowser
|
||||
python server_editor.py --inbrowser
|
||||
pause
|
||||
|
||||
popd
|
||||
|
||||
popd
|
||||
|
||||
endlocal
|
||||
131
scripts/sbv2/Install-Style-Bert-VITS2.bat
Normal file
131
scripts/sbv2/Install-Style-Bert-VITS2.bat
Normal file
@@ -0,0 +1,131 @@
|
||||
chcp 65001 > NUL
|
||||
@echo off
|
||||
|
||||
@REM エラーコードを遅延評価するために設定
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
@REM PowerShellのコマンド
|
||||
set PS_CMD=PowerShell -NoProfile -NoLogo -ExecutionPolicy Bypass
|
||||
|
||||
@REM PortableGitのURLと保存先
|
||||
set DL_URL=https://github.com/git-for-windows/git/releases/download/v2.44.0.windows.1/PortableGit-2.44.0-64-bit.7z.exe
|
||||
set DL_DST=%~dp0lib\PortableGit-2.44.0-64-bit.7z.exe
|
||||
|
||||
@REM Style-Bert-VITS2のリポジトリURL
|
||||
set REPO_URL=https://github.com/litagin02/Style-Bert-VITS2
|
||||
|
||||
@REM カレントディレクトリをbatファイルのディレクトリに変更
|
||||
pushd %~dp0
|
||||
|
||||
@REM lib フォルダがなければ作成
|
||||
if not exist lib\ ( mkdir lib )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo PS_CMD: %PS_CMD%
|
||||
echo DL_URL: %DL_URL%
|
||||
echo DL_DST: %DL_DST%
|
||||
echo REPO_URL: %REPO_URL%
|
||||
echo --------------------------------------------------
|
||||
echo.
|
||||
echo --------------------------------------------------
|
||||
echo Checking Git Installation...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: git --version
|
||||
pause
|
||||
git --version
|
||||
if !errorlevel! neq 0 (
|
||||
echo --------------------------------------------------
|
||||
echo Git is not installed, so download and use PortableGit.
|
||||
echo Downloading PortableGit...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: curl -L %DL_URL% -o "%DL_DST%"
|
||||
curl -L %DL_URL% -o "%DL_DST%"
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Extracting PortableGit...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: "%DL_DST%" -y
|
||||
"%DL_DST%" -y
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Removing %DL_DST%...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: del "%DL_DST%"
|
||||
del "%DL_DST%"
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
@REM Gitコマンドのパスを設定
|
||||
echo --------------------------------------------------
|
||||
echo Setting up PATH...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: set "PATH=%~dp0lib\PortableGit\bin;%PATH%"
|
||||
set "PATH=%~dp0lib\PortableGit\bin;%PATH%"
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Checking Git Installation...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: git --version
|
||||
git --version
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
)
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Cloning repository...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: git clone %REPO_URL%
|
||||
git clone %REPO_URL%
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
@REM Pythonのセットアップ
|
||||
echo --------------------------------------------------
|
||||
echo Setting up Python environment...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: call Setup-Python.bat ".\lib\python" ".\Style-Bert-VITS2\venv"
|
||||
call Setup-Python.bat ".\lib\python" ".\Style-Bert-VITS2\venv"
|
||||
if !errorlevel! neq 0 ( popd & exit /b !errorlevel! )
|
||||
|
||||
@REM Style-Bert-VITS2フォルダに移動
|
||||
pushd Style-Bert-VITS2
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Activating the virtual environment...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: call ".\venv\Scripts\activate.bat"
|
||||
call ".\venv\Scripts\activate.bat"
|
||||
if !errorlevel! neq 0 ( popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Installing PyTorch...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
||||
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Installing other dependencies...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: pip install -r requirements.txt
|
||||
pip install -r requirements.txt
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo ----------------------------------------
|
||||
echo Environment setup is complete. Start downloading the model.
|
||||
echo ----------------------------------------
|
||||
echo Executing: python initialize.py
|
||||
python initialize.py
|
||||
|
||||
echo ----------------------------------------
|
||||
echo Model download is complete. Start Style-Bert-VITS2 Editor.
|
||||
echo ----------------------------------------
|
||||
echo Executing: python server_editor.py --inbrowser
|
||||
python server_editor.py --inbrowser
|
||||
pause
|
||||
|
||||
popd
|
||||
|
||||
popd
|
||||
|
||||
endlocal
|
||||
117
scripts/sbv2/Setup-Python.bat
Normal file
117
scripts/sbv2/Setup-Python.bat
Normal file
@@ -0,0 +1,117 @@
|
||||
chcp 65001 > NUL
|
||||
|
||||
@REM https://github.com/Zuntan03/EasyBertVits2 より引用・改変
|
||||
|
||||
@REM エラーコードを遅延評価するために設定
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
@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 --------------------------------------------------
|
||||
echo PS_CMD: %PS_CMD%
|
||||
echo CURL_CMD: %CURL_CMD%
|
||||
echo PYTHON_CMD: %PYTHON_CMD%
|
||||
echo PYTHON_DIR: %PYTHON_DIR%
|
||||
echo VENV_DIR: %VENV_DIR%
|
||||
echo --------------------------------------------------
|
||||
echo.
|
||||
|
||||
if not exist "%PYTHON_DIR%"\ (
|
||||
echo --------------------------------------------------
|
||||
echo Downloading Python...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: %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 --------------------------------------------------
|
||||
echo Extracting zip...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: %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 --------------------------------------------------
|
||||
echo Removing python.zip...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: del python.zip
|
||||
del python.zip
|
||||
if !errorlevel! neq 0 ( pause & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Enabling 'site' module in the embedded Python environment...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: %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 --------------------------------------------------
|
||||
echo Installing pip and virtualenv...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: %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 --------------------------------------------------
|
||||
echo Installing pip...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: "%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 --------------------------------------------------
|
||||
echo Installing virtualenv...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: "%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 --------------------------------------------------
|
||||
echo Creating virtual environment...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: "%PYTHON_CMD%" -m virtualenv --copies "%VENV_DIR%"
|
||||
"%PYTHON_CMD%" -m virtualenv --copies "%VENV_DIR%"
|
||||
if !errorlevel! neq 0 ( pause & exit /b !errorlevel! )
|
||||
)
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Activating virtual environment...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: call "%VENV_DIR%\Scripts\activate.bat"
|
||||
call "%VENV_DIR%\Scripts\activate.bat"
|
||||
if !errorlevel! neq 0 ( pause & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Upgrading pip...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: python -m pip install --upgrade pip
|
||||
python -m pip install --upgrade pip
|
||||
if !errorlevel! neq 0 ( pause & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Completed.
|
||||
echo --------------------------------------------------
|
||||
|
||||
pause
|
||||
65
scripts/sbv2/Update-Style-Bert-VITS2.bat
Normal file
65
scripts/sbv2/Update-Style-Bert-VITS2.bat
Normal file
@@ -0,0 +1,65 @@
|
||||
chcp 65001 > NUL
|
||||
@echo off
|
||||
|
||||
@REM エラーコードを遅延評価するために設定
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
|
||||
pushd Style-Bert-VITS2
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Checking Git Installation...
|
||||
echo --------------------------------------------------
|
||||
git --version
|
||||
if !errorlevel! neq 0 (
|
||||
echo --------------------------------------------------
|
||||
echo Global Git is not installed, so use PortableGit.
|
||||
echo Setting up PATH...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: set "PATH=%~dp0lib\PortableGit\bin;%PATH%"
|
||||
set "PATH=%~dp0lib\PortableGit\bin;%PATH%"
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Checking Git Installation...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: git --version
|
||||
git --version
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
)
|
||||
|
||||
pause
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Git pull...
|
||||
echo --------------------------------------------------
|
||||
git pull
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
@REM 仮想環境のpip requirements.txtを更新
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Activating virtual environment...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: call ".\venv\Scripts\activate.bat"
|
||||
call ".\venv\Scripts\activate.bat"
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo --------------------------------------------------
|
||||
echo Updating dependencies...
|
||||
echo --------------------------------------------------
|
||||
echo Executing: pip install -U -r requirements.txt
|
||||
pip install -U -r requirements.txt
|
||||
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
|
||||
|
||||
echo ----------------------------------------
|
||||
echo Update completed.
|
||||
echo ----------------------------------------
|
||||
|
||||
pause
|
||||
|
||||
popd
|
||||
|
||||
popd
|
||||
Reference in New Issue
Block a user