This commit is contained in:
tuna2134
2026-07-20 21:29:02 +09:00
parent b8ce11605c
commit 7d535f3761
2 changed files with 15 additions and 4 deletions

View File

@@ -8,6 +8,8 @@
"source": [ "source": [
"# Style-Bert-VITS2 (ver 2.7.0) のGoogle Colabでの学習\n", "# Style-Bert-VITS2 (ver 2.7.0) のGoogle Colabでの学習\n",
"\n", "\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/litagin02/Style-Bert-VITS2/blob/master/colab.ipynb)\n",
"\n",
"Google Colab上でStyle-Bert-VITS2の学習を行うことができます。\n", "Google Colab上でStyle-Bert-VITS2の学習を行うことができます。\n",
"\n", "\n",
"このnotebookでは、通常使用ではあなたのGoogle Driveにフォルダ`Style-Bert-VITS2`を作り、その内部での作業を行います。他のフォルダには触れません。\n", "このnotebookでは、通常使用ではあなたのGoogle Driveにフォルダ`Style-Bert-VITS2`を作り、その内部での作業を行います。他のフォルダには触れません。\n",
@@ -15,6 +17,9 @@
"\n", "\n",
"## 流れ\n", "## 流れ\n",
"\n", "\n",
"### Matcha Flow + Differential Attention V2をFTするとき\n",
"3の設定セルで`matcha_only = True`のまま上から実行してください。4ではJP-Extraかどうかを自動判定するため、学習開始セルは1つだけ実行すれば完了です。FlashAttentionは使用しません。\n",
"\n",
"### 学習を最初からやりたいとき\n", "### 学習を最初からやりたいとき\n",
"上から順に実行していけばいいです。音声合成に必要なファイルはGoogle Driveの`Style-Bert-VITS2/model_assets/`に保存されます。また、途中経過も`Style-Bert-VITS2/Data/`に保存されるので、学習を中断したり、途中から再開することもできます。\n", "上から順に実行していけばいいです。音声合成に必要なファイルはGoogle Driveの`Style-Bert-VITS2/model_assets/`に保存されます。また、途中経過も`Style-Bert-VITS2/Data/`に保存されるので、学習を中断したり、途中から再開することもできます。\n",
"\n", "\n",
@@ -419,8 +424,9 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"# 日本語特化版を「使う」場合\n", "# use_jp_extraに合わせて学習スクリプトを自動選択して開始\n",
"!python train_ms_jp_extra.py --config {config_path} --model {dataset_path} --assets_root {assets_root}" "train_script = \"train_ms_jp_extra.py\" if use_jp_extra else \"train_ms.py\"\n",
"!python {train_script} --config {config_path} --model {dataset_path} --assets_root {assets_root}"
] ]
}, },
{ {
@@ -431,8 +437,7 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"# 日本語特化版を「使わない」場合\n", "# 学習開始は上のセルだけで完了します。"
"!python train_ms.py --config {config_path} --model {dataset_path} --assets_root {assets_root}"
] ]
}, },
{ {

View File

@@ -103,3 +103,9 @@ python train_ms_jp_extra.py [--repo_id <username>/<repo_name>] [--skip_default_s
Optional: Optional:
- `--repo_id`: Hugging Face repository ID to upload the trained model to. You should have logged in using `huggingface-cli login` before running this command. - `--repo_id`: Hugging Face repository ID to upload the trained model to. You should have logged in using `huggingface-cli login` before running this command.
- `--skip_default_style`: Skip making the default style vector. Use this if you want to resume training (since the default style vector has been already made). - `--skip_default_style`: Skip making the default style vector. Use this if you want to resume training (since the default style vector has been already made).
For Matcha-only fine-tuning of an already preprocessed dataset:
```bash
python configure_matcha_ft.py --config Data/<model_name>/config.json --learning-rate 0.0001
```