11
Dataset.bat
Normal file
11
Dataset.bat
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
chcp 65001 > NUL
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
echo Running gradio_tabs/dataset.py...
|
||||||
|
venv\Scripts\python gradio_tabs/dataset.py
|
||||||
|
|
||||||
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
popd
|
||||||
|
pause
|
||||||
11
Inference.bat
Normal file
11
Inference.bat
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
chcp 65001 > NUL
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
echo Running gradio_tabs/inference.py...
|
||||||
|
venv\Scripts\python gradio_tabs/inference.py
|
||||||
|
|
||||||
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
popd
|
||||||
|
pause
|
||||||
11
Merge.bat
Normal file
11
Merge.bat
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
chcp 65001 > NUL
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
echo Running gradio_tabs/merge.py...
|
||||||
|
venv\Scripts\python gradio_tabs/merge.py
|
||||||
|
|
||||||
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
popd
|
||||||
|
pause
|
||||||
@@ -15,6 +15,7 @@ You can install via `pip install style-bert-vits2` (inference only), see [librar
|
|||||||
- [Zennの解説記事](https://zenn.dev/litagin/articles/034819a5256ff4)
|
- [Zennの解説記事](https://zenn.dev/litagin/articles/034819a5256ff4)
|
||||||
|
|
||||||
- [**リリースページ**](https://github.com/litagin02/Style-Bert-VITS2/releases/)、[更新履歴](/docs/CHANGELOG.md)
|
- [**リリースページ**](https://github.com/litagin02/Style-Bert-VITS2/releases/)、[更新履歴](/docs/CHANGELOG.md)
|
||||||
|
- 2024-06-16: Ver 2.6.0 (モデルの差分マージ・加重マージ・ヌルモデルマージの追加)
|
||||||
- 2024-06-14: Ver 2.5.1 (利用規約をお願いへ変更したのみ)
|
- 2024-06-14: Ver 2.5.1 (利用規約をお願いへ変更したのみ)
|
||||||
- 2024-06-02: Ver 2.5.0 (**[利用規約](/docs/TERMS_OF_USE.md)の追加**、フォルダ分けからのスタイル生成、小春音アミ・あみたろモデルの追加、インストールの高速化等)
|
- 2024-06-02: Ver 2.5.0 (**[利用規約](/docs/TERMS_OF_USE.md)の追加**、フォルダ分けからのスタイル生成、小春音アミ・あみたろモデルの追加、インストールの高速化等)
|
||||||
- 2024-03-16: ver 2.4.1 (**batファイルによるインストール方法の変更**)
|
- 2024-03-16: ver 2.4.1 (**batファイルによるインストール方法の変更**)
|
||||||
|
|||||||
11
StyleVectors.bat
Normal file
11
StyleVectors.bat
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
chcp 65001 > NUL
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
echo Running gradio_tabs/style_vectors.py...
|
||||||
|
venv\Scripts\python gradio_tabs/style_vectors.py
|
||||||
|
|
||||||
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
popd
|
||||||
|
pause
|
||||||
11
Train.bat
Normal file
11
Train.bat
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
chcp 65001 > NUL
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
echo Running gradio_tabs/train.py...
|
||||||
|
venv\Scripts\python gradio_tabs/train.py
|
||||||
|
|
||||||
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
popd
|
||||||
|
pause
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"id": "F7aJhsgLAWvO"
|
"id": "F7aJhsgLAWvO"
|
||||||
},
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"# Style-Bert-VITS2 (ver 2.5.1) のGoogle Colabでの学習\n",
|
"# Style-Bert-VITS2 (ver 2.6.0) のGoogle Colabでの学習\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Google Colab上でStyle-Bert-VITS2の学習を行うことができます。\n",
|
"Google Colab上でStyle-Bert-VITS2の学習を行うことができます。\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|||||||
@@ -69,5 +69,5 @@
|
|||||||
"use_spectral_norm": false,
|
"use_spectral_norm": false,
|
||||||
"gin_channels": 256
|
"gin_channels": 256
|
||||||
},
|
},
|
||||||
"version": "2.5.1"
|
"version": "2.6.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,5 +76,5 @@
|
|||||||
"initial_channel": 64
|
"initial_channel": 64
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "2.5.1-JP-Extra"
|
"version": "2.6.0-JP-Extra"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v2.6.0 (2024-06-16)
|
||||||
|
|
||||||
|
### 新機能
|
||||||
|
モデルのマージ時に、今までの `new = (1 - weight) * A + weight * B` の他に、次を追加
|
||||||
|
- `new = A + weight * (B - C)`: 差分マージ
|
||||||
|
- `new = a * A + b * B + c * C`: 加重和マージ
|
||||||
|
- `new = A + weight * B`: ヌルモデルのマージ
|
||||||
|
差分マージは、例えばBを「Cと同じ話者だけど囁いているモデル」とすると、`B - C`が囁きベクトル的なものだと思えるので、それをAに足すことで、Aの話者が囁いているような音声を生成できるようになります。
|
||||||
|
|
||||||
|
また、加重和で`new = A - B`を作って、それをヌルモデルマージで別のモデルに足せば、実質差分マージを実現できます。また謎に`new = -A`や`new = 41 * A`等のモデルも作ることができます。
|
||||||
|
|
||||||
|
これらのマージの活用法については各自いろいろ考えて実験してみて、面白い使い方があればぜひ共有してください。
|
||||||
|
|
||||||
|
囁きについて実験的に作ったヌルモデルを[こちら](https://huggingface.co/litagin/sbv2_null_models)に置いています。これをヌルモデルマージで使うことで、任意のモデルを囁きモデルにある程度は変換できます。
|
||||||
|
|
||||||
|
### 改善?
|
||||||
|
|
||||||
|
- WebUIの`App.bat`の起動が少し重いので、それぞれの機能を分割した`Dataset.bat`, `Inference.bat`, `Merge.bat`, `StyleVectors.bat`, `Train.bat`を追加 (今までの`App.bat`もこれまで通り使えます)
|
||||||
|
|
||||||
## v2.5.1 (2024-06-14)
|
## v2.5.1 (2024-06-14)
|
||||||
|
|
||||||
ライセンスとのコンフリクトから、[利用規約](/docs/TERMS_OF_USE.md)を[開発陣からのお願いとデフォルトモデルの利用規約](/docs/TERMS_OF_USE.md)に変更しました。
|
ライセンスとのコンフリクトから、[利用規約](/docs/TERMS_OF_USE.md)を[開発陣からのお願いとデフォルトモデルの利用規約](/docs/TERMS_OF_USE.md)に変更しました。
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import gradio as gr
|
import gradio as gr
|
||||||
|
|
||||||
|
from style_bert_vits2.constants import GRADIO_THEME
|
||||||
from style_bert_vits2.logging import logger
|
from style_bert_vits2.logging import logger
|
||||||
from style_bert_vits2.utils.subprocess import run_script_with_log
|
from style_bert_vits2.utils.subprocess import run_script_with_log
|
||||||
|
|
||||||
@@ -109,7 +110,7 @@ Style-Bert-VITS2の学習用データセットを作成するためのツール
|
|||||||
|
|
||||||
|
|
||||||
def create_dataset_app() -> gr.Blocks:
|
def create_dataset_app() -> gr.Blocks:
|
||||||
with gr.Blocks() as app:
|
with gr.Blocks(theme=GRADIO_THEME) as app:
|
||||||
gr.Markdown(
|
gr.Markdown(
|
||||||
"**既に1ファイル2-12秒程度の音声ファイル集とその書き起こしデータがある場合は、このタブは使用せずに学習できます。**"
|
"**既に1ファイル2-12秒程度の音声ファイル集とその書き起こしデータがある場合は、このタブは使用せずに学習できます。**"
|
||||||
)
|
)
|
||||||
@@ -257,3 +258,8 @@ def create_dataset_app() -> gr.Blocks:
|
|||||||
)
|
)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app = create_dataset_app()
|
||||||
|
app.launch(inbrowser=True)
|
||||||
|
|||||||
@@ -523,3 +523,15 @@ def create_inference_app(model_holder: TTSModelHolder) -> gr.Blocks:
|
|||||||
)
|
)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
from config import get_path_config
|
||||||
|
import torch
|
||||||
|
|
||||||
|
path_config = get_path_config()
|
||||||
|
assets_root = path_config.assets_root
|
||||||
|
device = "cuda" if torch.cuda.is_available() else "cpu"
|
||||||
|
model_holder = TTSModelHolder(assets_root, device)
|
||||||
|
app = create_inference_app(model_holder)
|
||||||
|
app.launch(inbrowser=True)
|
||||||
|
|||||||
1368
gradio_tabs/merge.py
1368
gradio_tabs/merge.py
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,8 @@
|
|||||||
|
"""
|
||||||
|
TODO:
|
||||||
|
importが重いので、WebUI全般が重くなっている。どうにかしたい。
|
||||||
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import shutil
|
import shutil
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -568,3 +573,8 @@ def create_style_vectors_app():
|
|||||||
)
|
)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app = create_style_vectors_app()
|
||||||
|
app.launch(inbrowser=True)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import gradio as gr
|
|||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from config import get_path_config
|
from config import get_path_config
|
||||||
|
from style_bert_vits2.constants import GRADIO_THEME
|
||||||
from style_bert_vits2.logging import logger
|
from style_bert_vits2.logging import logger
|
||||||
from style_bert_vits2.utils.stdout_wrapper import SAFE_STDOUT
|
from style_bert_vits2.utils.stdout_wrapper import SAFE_STDOUT
|
||||||
from style_bert_vits2.utils.subprocess import run_script_with_log, second_elem_of
|
from style_bert_vits2.utils.subprocess import run_script_with_log, second_elem_of
|
||||||
@@ -484,7 +485,7 @@ english_teacher.wav|Mary|EN|How are you? I'm fine, thank you, and you?
|
|||||||
|
|
||||||
|
|
||||||
def create_train_app():
|
def create_train_app():
|
||||||
with gr.Blocks().queue() as app:
|
with gr.Blocks(theme=GRADIO_THEME).queue() as app:
|
||||||
gr.Markdown(change_log_md)
|
gr.Markdown(change_log_md)
|
||||||
with gr.Accordion("使い方", open=False):
|
with gr.Accordion("使い方", open=False):
|
||||||
gr.Markdown(how_to_md)
|
gr.Markdown(how_to_md)
|
||||||
@@ -840,3 +841,8 @@ def create_train_app():
|
|||||||
)
|
)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app = create_train_app()
|
||||||
|
app.launch(inbrowser=True)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from style_bert_vits2.utils.strenum import StrEnum
|
|||||||
|
|
||||||
|
|
||||||
# Style-Bert-VITS2 のバージョン
|
# Style-Bert-VITS2 のバージョン
|
||||||
VERSION = "2.5.1"
|
VERSION = "2.6.0"
|
||||||
|
|
||||||
# Style-Bert-VITS2 のベースディレクトリ
|
# Style-Bert-VITS2 のベースディレクトリ
|
||||||
BASE_DIR = Path(__file__).parent.parent
|
BASE_DIR = Path(__file__).parent.parent
|
||||||
|
|||||||
Reference in New Issue
Block a user