MasayaKawamura / MB-iSTFT-VITS

Lightweight and High-Fidelity End-to-End Text-to-Speech with Multi-Band Generation and Inverse Short-Time Fourier Transform
Apache License 2.0
401 stars 64 forks source link

AttributeError: 'WN' object has no attribute 'cond_layer' #10

Closed ORI-Muchim closed 1 year ago

ORI-Muchim commented 1 year ago

I've changed requirements.txt, torch==0.12.0 and torchvision==0.7.0.

However, the same error occurs.

Traceback (most recent call last): File "train_latest_ms.py", line 317, in main() File "train_latest_ms.py", line 53, in main mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,)) File "/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py", line 240, in spawn return start_processes(fn, args, nprocs, join, daemon, start_method='spawn') File "/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py", line 198, in start_processes while not context.join(): File "/usr/local/lib/python3.8/dist-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 "/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py", line 69, in _wrap fn(i, args) File "/content/drive/MyDrive/MB-iSTFT-VITS-multilingual/train_latest_ms.py", line 121, 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 "/content/drive/MyDrive/MB-iSTFT-VITS-multilingual/train_latest_ms.py", line 150, in train_and_evaluate (z, z_p, m_p, logs_p, m_q, logs_q) = net_g(x, x_lengths, spec, spec_lengths, speakers) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/distributed.py", line 1008, in forward output = self._run_ddp_forward(*inputs, *kwargs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/distributed.py", line 969, in _run_ddp_forward return module_to_run(inputs[0], kwargs[0]) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, kwargs) File "/content/drive/MyDrive/MB-iSTFT-VITS-multilingual/models.py", line 663, in forward z, m_q, logs_q, y_mask = self.enc_q(y, y_lengths, g=g) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, *kwargs) File "/content/drive/MyDrive/MB-iSTFT-VITS-multilingual/models.py", line 240, in forward x = self.enc(x, x_mask, g=g) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "/content/drive/MyDrive/MB-iSTFT-VITS-multilingual/modules.py", line 153, in forward g = self.cond_layer(g) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1207, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'WN' object has no attribute 'cond_layer'

This is error code. Does anyone know how to solve it?

Thank you.

Jackiexiao commented 1 year ago

add "gin_channels": 256 to config "model" for multi speaker

ORI-Muchim commented 1 year ago

add "gin_channels": 256 to config "model" for multi speaker

Oh! It works really well! Thank you very much.