Open wlz987 opened 1 year ago
Hi @longzewei ! Thanks for addressing the issue. Can you elaborate on the problem you've faced
Also, the code was updated recently, so consider to use the new version
config.txt
Traceback (most recent call last):
File "/home/work/语音相关/文字转语音/vits2/train_ms.py", line 224, in
-- Process 0 terminated with the following error: Traceback (most recent call last): File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap fn(i, args) File "/home/work/语音相关/文字转语音/vits2/train_ms.py", line 92, in run train_and_evaluate(rank, epoch, hps, [net_g, net_d], [optim_g, optim_d], [scheduler_g, scheduler_d], scaler, [train_loader, eval_loader], logger, [writer, writer_eval]) File "/home/work/语音相关/文字转语音/vits2/train_ms.py", line 124, in train_and_evaluate y_hat, l_length, attn, ids_slice, x_mask, z_mask, (z, z_p, m_p, logs_p, m_q, logs_q) = net_g(x, x_lengths, spec, spec_lengths, speakers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/nn/parallel/distributed.py", line 1156, in forward output = self._run_ddp_forward(*inputs, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/nn/parallel/distributed.py", line 1110, in _run_ddp_forward return module_to_run(inputs[0], kwargs[0]) # type: ignore[index] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/work/语音相关/文字转语音/vits2/model/models.py", line 72, in forward z, m_q, logs_q, y_mask = self.enc_q(y, y_lengths, g=g) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/work/语音相关/文字转语音/vits2/model/encoders.py", line 121, in forward x = self.enc(x, x_mask, g=g) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/work/语音相关/文字转语音/vits2/model/modules.py", line 47, in forward g = self.cond_layer(g.mT).mT ^^^^^^^^^^^^^^^ File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1614, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'WN' object has no attribute 'cond_layer'
Hi, @wlz987 ! I checked multi-speaker training and it works fine.
I updated the code recently, so try to run the newer version
.
If there any further problems, feel free to open an issue
n_speakers > 0 has problem