Installation
step 1
このリポジトリをクローンします
git clone https://github.com/seichi042I/Bert-VITS2-JP
cd Bert-VITS2
step 2
任意のpython仮想環境で依存パッケージをインストールします。
pip3 install torch torchvision torchaudio
pip install -r requirements.txt
step 3
setup.shを実行します。必要なweightファイルやコーパスをダウンロード、配置する処理です。
./setup.sh
引数にモデル名を指定することができます
./setup.sh characterA
Training
installationが完了した状態で以下のコマンドを実行します。
python train_ms.py
チェックポイントモデルはexp/モデル名/logs
に保存されます
Inference
以下のように、config.ymlの100行目あたりにモデルのパスを指定する箇所があるので、models/G_1000.pth(数字の部分は適宜変更してください)と書きかえます。
webui:
# 推理设备
device: "cuda"
# 模型路径
model: "genshin/models/G_8000.pth" -> "models/G_1000.pth"に変更
...
webuiを起動します。
python webui.py
Custom Dataset Training
任意のデータセットで学習する場合の手順です。
step 1
Data_format.mdに書かれている形式に従ってデータセットを作成します。
作成したデータセットをData
ディレクトリに配置します。
step 2
setup.sh
を実行します
./setup.sh
step 3
学習を実行します。
python train_ms.py