Feat: each tab executables
This commit is contained in:
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
|
||||||
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
|
||||||
@@ -13,6 +13,12 @@
|
|||||||
|
|
||||||
これらのマージの活用法については各自いろいろ考えて実験してみて、面白い使い方があればぜひ共有してください。
|
これらのマージの活用法については各自いろいろ考えて実験してみて、面白い使い方があればぜひ共有してください。
|
||||||
|
|
||||||
|
囁きについて実験的に作ったヌルモデルを[こちら](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)
|
||||||
|
|||||||
@@ -910,6 +910,8 @@ add_diff_md = """
|
|||||||
new_model = A + weight * (B - C)
|
new_model = A + weight * (B - C)
|
||||||
```
|
```
|
||||||
としてマージされます。
|
としてマージされます。
|
||||||
|
|
||||||
|
通常のマージと違い、**重みを1にしてもAの要素はそのまま保たれます**。
|
||||||
"""
|
"""
|
||||||
|
|
||||||
weighted_sum_md = """
|
weighted_sum_md = """
|
||||||
@@ -935,7 +937,11 @@ new_model = A + weight * B
|
|||||||
```
|
```
|
||||||
としてマージされます。
|
としてマージされます。
|
||||||
|
|
||||||
|
通常のマージと違い、**重みを1にしてもAの要素はそのまま保たれます**。
|
||||||
|
|
||||||
実際にはヌルモデルでないBに対しても使えますが、その場合はおそらく音声が正常に生成されないモデルができる気がします。が、もしかしたら何かに使えるかもしれません。
|
実際にはヌルモデルでないBに対しても使えますが、その場合はおそらく音声が正常に生成されないモデルができる気がします。が、もしかしたら何かに使えるかもしれません。
|
||||||
|
|
||||||
|
囁きについて実験的に作ったヌルモデルを[こちら](https://huggingface.co/litagin/sbv2_null_models)に置いています。これを `B` に使うことで、任意のモデルを囁きモデルにある程度は変換できます。
|
||||||
"""
|
"""
|
||||||
|
|
||||||
tts_md = f"""
|
tts_md = f"""
|
||||||
@@ -1522,4 +1528,4 @@ if __name__ == "__main__":
|
|||||||
assets_root, device="cuda" if torch.cuda.is_available() else "cpu"
|
assets_root, device="cuda" if torch.cuda.is_available() else "cpu"
|
||||||
)
|
)
|
||||||
app = create_merge_app(model_holder)
|
app = create_merge_app(model_holder)
|
||||||
app.launch()
|
app.launch(inbrowser=True)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user