From 9625014184e2c77a9817601298d683fc1fed882d Mon Sep 17 00:00:00 2001 From: litagin02 Date: Wed, 29 May 2024 06:53:21 +0900 Subject: [PATCH] Feat: use uv for bat installer --- colab.ipynb | 4 ++-- requirements-infer.txt | 22 ++++++++++++++++++++++ scripts/Install-Style-Bert-VITS2-CPU.bat | 15 +++++++++++++-- scripts/Install-Style-Bert-VITS2.bat | 19 +++++++++++++++---- 4 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 requirements-infer.txt diff --git a/colab.ipynb b/colab.ipynb index de46741..3b32dd3 100644 --- a/colab.ipynb +++ b/colab.ipynb @@ -395,7 +395,7 @@ "outputs": [], "source": [ "# 日本語特化版を「使う」場合\n", - "!python train_ms_jp_extra.py --config {config_path} --model {dataset_path} --assets_root {assets_root} --use_custom_batch_sampler" + "!python train_ms_jp_extra.py --config {config_path} --model {dataset_path} --assets_root {assets_root}" ] }, { @@ -407,7 +407,7 @@ "outputs": [], "source": [ "# 日本語特化版を「使わない」場合\n", - "!python train_ms.py --config {config_path} --model {dataset_path} --assets_root {assets_root} --use_custom_batch_sampler" + "!python train_ms.py --config {config_path} --model {dataset_path} --assets_root {assets_root}" ] }, { diff --git a/requirements-infer.txt b/requirements-infer.txt new file mode 100644 index 0000000..dcae43f --- /dev/null +++ b/requirements-infer.txt @@ -0,0 +1,22 @@ +cmudict +cn2an +# faster-whisper==0.10.1 +g2p_en +GPUtil +gradio +jieba +# librosa==0.9.2 +loguru +num2words +# protobuf==4.25 +psutil +# punctuators +# pyannote.audio>=3.1.0 +# pyloudnorm +pyopenjtalk-dict +pypinyin +pyworld-prebuilt +# stable_ts +# tensorboard +transformers +# umap-learn diff --git a/scripts/Install-Style-Bert-VITS2-CPU.bat b/scripts/Install-Style-Bert-VITS2-CPU.bat index b62655a..e9d7419 100644 --- a/scripts/Install-Style-Bert-VITS2-CPU.bat +++ b/scripts/Install-Style-Bert-VITS2-CPU.bat @@ -89,6 +89,10 @@ if !errorlevel! neq 0 ( popd & exit /b !errorlevel! ) @REM Style-Bert-VITS2フォルダに移動 pushd Style-Bert-VITS2 +@REM 後で消す!!!!!!!!!! +git checkout dev +@REM 後で消す!!!!!!!!!! + echo -------------------------------------------------- echo Activating the virtual environment... echo -------------------------------------------------- @@ -96,11 +100,18 @@ echo Executing: call ".\venv\Scripts\activate.bat" call ".\venv\Scripts\activate.bat" if !errorlevel! neq 0 ( popd & exit /b !errorlevel! ) +echo -------------------------------------------------- +echo Installing package manager uv... +echo -------------------------------------------------- +echo Executing: pip install uv +pip install uv +if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! ) + echo -------------------------------------------------- echo Installing dependencies... echo -------------------------------------------------- -echo Executing: pip install -r requirements.txt -pip install -r requirements.txt +echo Executing: uv pip install -r requirements-infer.txt +uv pip install -r requirements-infer.txt if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! ) echo ---------------------------------------- diff --git a/scripts/Install-Style-Bert-VITS2.bat b/scripts/Install-Style-Bert-VITS2.bat index 35ce45c..62eb2b2 100644 --- a/scripts/Install-Style-Bert-VITS2.bat +++ b/scripts/Install-Style-Bert-VITS2.bat @@ -89,6 +89,10 @@ if !errorlevel! neq 0 ( popd & exit /b !errorlevel! ) @REM Style-Bert-VITS2フォルダに移動 pushd Style-Bert-VITS2 +@REM 後で消す!!!!!!!!!! +git checkout dev +@REM 後で消す!!!!!!!!!! + echo -------------------------------------------------- echo Activating the virtual environment... echo -------------------------------------------------- @@ -96,18 +100,25 @@ echo Executing: call ".\venv\Scripts\activate.bat" call ".\venv\Scripts\activate.bat" if !errorlevel! neq 0 ( popd & exit /b !errorlevel! ) +echo -------------------------------------------------- +echo Installing package manager uv... +echo -------------------------------------------------- +echo Executing: pip install uv +pip install uv +if !errorlevel! neq 0 ( pause & 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 +echo Executing: uv pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu118 +uv pip install torch 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 +echo Executing: uv pip install -r requirements.txt +uv pip install -r requirements.txt if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! ) echo ----------------------------------------