litagin02 / Style-Bert-VITS2

Style-Bert-VITS2: Bert-VITS2 with more controllable voice styles.
GNU Affero General Public License v3.0
692 stars 82 forks source link

Error while training #103

Closed OzoneAsai closed 3 months ago

OzoneAsai commented 6 months ago
03-17 22:03:47 |  INFO  | subprocess.py:23 | Running: train_ms_jp_extra.py --config Data\Nene\config.json --model Data\Nene
03-17 22:03:51 |  INFO  | train_ms_jp_extra.py:110 | Loading configuration from config 0
03-17 22:03:51 |  INFO  | train_ms_jp_extra.py:110 | Loading configuration from config localhost
03-17 22:03:51 |  INFO  | train_ms_jp_extra.py:110 | Loading configuration from config 10086
03-17 22:03:51 |  INFO  | train_ms_jp_extra.py:110 | Loading configuration from config 0
03-17 22:03:51 |  INFO  | train_ms_jp_extra.py:110 | Loading configuration from config 1
03-17 22:03:51 |  INFO  | train_ms_jp_extra.py:112 | Loading environment variables
MASTER_ADDR: localhost,
MASTER_PORT: 10086,
WORLD_SIZE: 1,
RANK: 0,
LOCAL_RANK: 0
03-17 22:03:51 |  INFO  | default_style.py:17 | Save style config (only Neutral) to model_assets\Nene\config.json
03-17 22:03:51 |  INFO  | default_style.py:31 | Saved mean style vector to model_assets\Nene\style_vectors.npy
03-17 22:03:51 |WARNING | __init__.py:241 | C:\WorkSpace\Style-Bert-VITS2\Style-Bert-VITS2\style_bert_vits2\models\utils is not a git repository, therefore hash value comparison will be ignored.
03-17 22:03:51 |  INFO  | data_utils.py:68 | Init dataset...
100%|███████████████████████████████████████████████████████████████████████████| 3890/3890 [00:00<00:00, 14552.10it/s]
03-17 22:03:52 |  INFO  | data_utils.py:83 | skipped: 0, total: 3890
03-17 22:03:52 |  INFO  | data_utils.py:349 | Bucket info: [1446, 604, 511, 454, 350, 216, 148, 79]
03-17 22:03:52 |  INFO  | data_utils.py:68 | Init dataset...
0it [00:00, ?it/s]
03-17 22:03:52 |  INFO  | data_utils.py:83 | skipped: 0, total: 0
03-17 22:03:52 |  INFO  | train_ms_jp_extra.py:252 | Using noise scaled MAS for VITS2
03-17 22:03:54 |  INFO  | checkpoints.py:37 | Loading model and optimizer at iteration 1 from Data\Nene\models\WD_1000.pth
03-17 22:03:54 |  INFO  | checkpoints.py:88 | Loaded 'Data\Nene\models\WD_1000.pth' (iteration 1)
03-17 22:03:54 |  INFO  | checkpoints.py:37 | Loading model and optimizer at iteration 1 from Data\Nene\models\G_1000.pth
03-17 22:03:55 |  INFO  | checkpoints.py:88 | Loaded 'Data\Nene\models\G_1000.pth' (iteration 1)
03-17 22:03:55 |  INFO  | checkpoints.py:37 | Loading model and optimizer at iteration 1 from Data\Nene\models\D_1000.pth
03-17 22:03:55 |  INFO  | checkpoints.py:88 | Loaded 'Data\Nene\models\D_1000.pth' (iteration 1)
03-17 22:03:55 |  INFO  | train_ms_jp_extra.py:444 | ******************Found the model. Current epoch is 1, gloabl step is 1000*********************
03-17 22:03:55 |  INFO  | train_ms_jp_extra.py:518 | Start training.
Epoch 1(3%)/100:   0%|▏                                                       | 1105/381800 [01:17<68:28:27,  1.54it/s]03-17 22:05:19 | ERROR  | subprocess.py:32 | Error: train_ms_jp_extra.py --config Data\Nene\config.json --model Data\Nene
Some weights of the model checkpoint at ./slm/wavlm-base-plus were not used when initializing WavLMModel: ['encoder.pos_conv_embed.conv.weight_g', 'encoder.pos_conv_embed.conv.weight_v']
- This IS expected if you are initializing WavLMModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing WavLMModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of WavLMModel were not initialized from the model checkpoint at ./slm/wavlm-base-plus and are newly initialized: ['encoder.pos_conv_embed.conv.parametrizations.weight.original0', 'encoder.pos_conv_embed.conv.parametrizations.weight.original1']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
03-17 22:06:05 |  INFO  | subprocess.py:23 | Running: train_ms_jp_extra.py --config Data\Nene\config.json --model Data\Nene --skip_default_style
03-17 22:06:10 |  INFO  | train_ms_jp_extra.py:110 | Loading configuration from config 0
03-17 22:06:10 |  INFO  | train_ms_jp_extra.py:110 | Loading configuration from config localhost
03-17 22:06:10 |  INFO  | train_ms_jp_extra.py:110 | Loading configuration from config 10086
03-17 22:06:10 |  INFO  | train_ms_jp_extra.py:110 | Loading configuration from config 0
03-17 22:06:10 |  INFO  | train_ms_jp_extra.py:110 | Loading configuration from config 1
03-17 22:06:10 |  INFO  | train_ms_jp_extra.py:112 | Loading environment variables
MASTER_ADDR: localhost,
MASTER_PORT: 10086,
WORLD_SIZE: 1,
RANK: 0,
LOCAL_RANK: 0
03-17 22:06:10 |WARNING | __init__.py:241 | C:\WorkSpace\Style-Bert-VITS2\Style-Bert-VITS2\style_bert_vits2\models\utils is not a git repository, therefore hash value comparison will be ignored.
03-17 22:06:10 |  INFO  | data_utils.py:68 | Init dataset...
100%|███████████████████████████████████████████████████████████████████████████| 3890/3890 [00:00<00:00, 14279.79it/s]
03-17 22:06:10 |  INFO  | data_utils.py:83 | skipped: 0, total: 3890
03-17 22:06:10 |  INFO  | data_utils.py:349 | Bucket info: [1446, 604, 511, 454, 350, 216, 148, 79]
03-17 22:06:10 |  INFO  | data_utils.py:68 | Init dataset...
0it [00:00, ?it/s]
03-17 22:06:10 |  INFO  | data_utils.py:83 | skipped: 0, total: 0
03-17 22:06:10 |  INFO  | train_ms_jp_extra.py:252 | Using noise scaled MAS for VITS2
03-17 22:06:12 |  INFO  | checkpoints.py:37 | Loading model and optimizer at iteration 1 from Data\Nene\models\WD_1000.pth
03-17 22:06:12 |  INFO  | checkpoints.py:88 | Loaded 'Data\Nene\models\WD_1000.pth' (iteration 1)
03-17 22:06:12 |  INFO  | checkpoints.py:37 | Loading model and optimizer at iteration 1 from Data\Nene\models\G_1000.pth
03-17 22:06:13 |  INFO  | checkpoints.py:88 | Loaded 'Data\Nene\models\G_1000.pth' (iteration 1)
03-17 22:06:13 |  INFO  | checkpoints.py:37 | Loading model and optimizer at iteration 1 from Data\Nene\models\D_1000.pth
03-17 22:06:13 |  INFO  | checkpoints.py:88 | Loaded 'Data\Nene\models\D_1000.pth' (iteration 1)
03-17 22:06:13 |  INFO  | train_ms_jp_extra.py:444 | ******************Found the model. Current epoch is 1, gloabl step is 1000*********************
03-17 22:06:14 |  INFO  | train_ms_jp_extra.py:518 | Start training.
Epoch 1(20%)/100:   0%|▎                                                      | 1775/381800 [08:18<63:57:58,  1.65it/s]03-17 22:14:38 | ERROR  | subprocess.py:32 | Error: train_ms_jp_extra.py --config Data\Nene\config.json --model Data\Nene --skip_default_style
Some weights of the model checkpoint at ./slm/wavlm-base-plus were not used when initializing WavLMModel: ['encoder.pos_conv_embed.conv.weight_g', 'encoder.pos_conv_embed.conv.weight_v']
- This IS expected if you are initializing WavLMModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing WavLMModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of WavLMModel were not initialized from the model checkpoint at ./slm/wavlm-base-plus and are newly initialized: ['encoder.pos_conv_embed.conv.parametrizations.weight.original0', 'encoder.pos_conv_embed.conv.parametrizations.weight.original1']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
[rank0]:[W CUDAGuardImpl.h:115] Warning: CUDA warning: an illegal memory access was encountered (function destroyEvent)

03-17 22:14:38 | ERROR  | train.py:339 | Train failed.
litagin02 commented 6 months ago

学習を途中から再開しているようですが、学習途中のデータは以前の(再インストールする前の)バージョンでしたか? また、途中から再開でない場合に学習がエラーが出るかちゃんと回るかを教えていただきたいです。

OzoneAsai commented 6 months ago

そうですね。以前のバージョンです。 Dataの方のmodelを消してやったときにもこれが出ました。

litagin02 commented 6 months ago

Dataのrawとesd.listのみから始めて1から新しく学習しても同じエラーが出ますか?

turugi-ni commented 5 months ago

私もStyle-Bert-VITS2バージョン2.4.1で学習ができません、rawとesd.listのみにしてからトレーニングを始めても Error: 学習に失敗しました: Traceback (most recent call last): File "E:\sbv2\Style-Bert-VITS2\train_ms.py", line 969, in run() File "E:\sbv2\Style-Bert-VITS2\train_ms.py", line 199, in run default_style.save_neutral_vector( File "E:\sbv2\Style-Bert-VITS2\default_style.py", line 30, in save_neutral_vector x = np.concatenate(embs, axis=0) # (N, 256) ValueError: need at least one array to concatenate と出ます。

OzoneAsai commented 5 months ago

私もStyle-Bert-VITS2バージョン2.4.1で学習ができません、rawとesd.listのみにしてからトレーニングを始めても Error: 学習に失敗しました: Traceback (most recent call last): File "E:\sbv2\Style-Bert-VITS2\train_ms.py", line 969, in run() File "E:\sbv2\Style-Bert-VITS2\train_ms.py", line 199, in run default_style.save_neutral_vector( File "E:\sbv2\Style-Bert-VITS2\default_style.py", line 30, in save_neutral_vector x = np.concatenate(embs, axis=0) # (N, 256) ValueError: need at least one array to concatenate と出ます。

えっと、ちょっとesd.listの中身を見せてください。1~2行で十分です。もしかしたら、 wav/modelName/file001.wavになっているのにrawとesd.listしかないから、ダメなのかもしれません。 あるいは、事前処理をしていないか。 @turugi-ni

turugi-ni commented 5 months ago

私もStyle-Bert-VITS2バージョン2.4.1で学習ができません、rawとesd.listにしてからトレーニングを始めてもエラー: 学習に失敗しました: トレースバック (最新の呼び出しは最後): ファイル "E:\ sbv2\Style-Bert-VITS2\train_ms.py"、969 行目、run() ファイル「E:\sbv2\Style-Bert-VITS2\train_ms.py」、199 行目、run 内default_style.save_neutral_vector( File "E :\sbv2\Style-Bert-VITS2\default_style.py", line 30, in save_neutral_vector x = np.concatenate(embs, axis=0) # (N, 256) ValueError: 連結するには少なくとも 1 つの配列が必要です。

えっと、ちょっとesd.listの中身を見せてください。1~2行で十分です。 もしかしたら、になっているのにrawとesd.listしかないから、ダメなことはないかもしれませ wav/modelName/file001.wavん 。処理をしていないか。 @turugi-ni

esd.listの中身はこんな感じです Data\mimi_doraku_boyish_loli\wavs\0001.wav|mimi_doraku_boyish_loli|JP|おい!こっち来いよ!変な虫いたぞぉ! Data\mimi_doraku_boyish_loli\wavs\0002.wav|mimi_doraku_boyish_loli|JP|なんだよぉ…。 データセット自体はAivis-Datasetを使用して作成しまいたが、ほかのStyle-Bert-VITS2付属のデータセット作成ツールを使用した物でも同様のエラーが出ます。事前処理はちゃんと自動前処理を手順通りに行っています。 @OzoneAsai

OzoneAsai commented 5 months ago

事前処理前の正しい形式 2244c7e7_0001.wav|2244c7e7|JP|それも大切だけど、だからといって、会社の経営をおろそかにはできないでしょ? 事前処理後の正しい形式 Data/E1Test/wavs/vocalTohouSinyu.wav_0000022720_0000124480.wav|E1Test|JP|私、こう考えることにしてるの…… この辺に変更がなければ、前述の内容が成り立つのですが.... 一度、esd.listとrawだけ残した上で、 事前処理前の形にしてください。 (この場合は、いい感じのテキストエディターでData/E1Test/wavs/を検索して置き換え→(空白) にするなどしてください。) それでもう一度事前処理から行ってみてください @turugi-ni

turugi-ni commented 5 months ago

事前処理前の正しい形式 2244c7e7_0001.wav|2244c7e7|JP|それも大切だけど、だからといって、会社の経営をおろそかにはできないでしょ? 事前処理後の正しい形式 Data/E1Test/wavs/vocalTohouSinyu.wav_0000022720_0000124480.wav|E1Test|JP|私、こう考えることにしてるの…… この辺に変更がなければ、前述の内容が成り立つのですが.... 一度、esd.listとrawだけ残った上で、 事前処理前の形にし (この場合は、いい感じのテキストエディターでData/E1Test/wavs/検索して置き換えてください→(空白) にするなどしてください。) もう一度事前処理から行ってください。 @turugi-ni

esd.listからData/E1Test/wavs/を削除したら学習出来ました、ありがとうございました。 @OzoneAsai

OzoneAsai commented 3 months ago

解決するにも、環境の再現が不可能になったので