Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n_speakers > 0 有问题啊兄弟 #2

Open
wlz987 opened this issue Aug 30, 2023 · 3 comments
Open

n_speakers > 0 有问题啊兄弟 #2

wlz987 opened this issue Aug 30, 2023 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@wlz987
Copy link

wlz987 commented Aug 30, 2023

n_speakers > 0 has problem

@daniilrobnikov
Copy link
Owner

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

@wlz987
Copy link
Author

wlz987 commented Aug 31, 2023

config.txt
Traceback (most recent call last):
File "/home/work/语音相关/文字转语音/vits2/train_ms.py", line 224, in
main()
File "/home/work/语音相关/文字转语音/vits2/train_ms.py", line 39, in main
mp.spawn(
File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 239, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 197, in start_processes
while not context.join():
^^^^^^^^^^^^^^
File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 160, in join
raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:

-- 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'

@daniilrobnikov
Copy link
Owner

daniilrobnikov commented Sep 10, 2023

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

@daniilrobnikov daniilrobnikov added bug Something isn't working help wanted Extra attention is needed and removed bug Something isn't working labels Sep 10, 2023
Temduck added a commit to Temduck/vits2_unofficial that referenced this issue Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants