jaywalnut310 / vits

VITS: Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
https://jaywalnut310.github.io/vits-demo/index.html
MIT License
6.53k stars 1.22k forks source link

RuntimeError: view_as_complex is only supported for float and double tensors, but got a tensor of scalar type: Half #76

Closed shoang22 closed 1 year ago

shoang22 commented 1 year ago

I just ran train.py on the LJS dataset, and I got this error:

Exception has occurred: ProcessRaisedException

-- Process 0 terminated with the following error: Traceback (most recent call last): File "/home/steven.hoang/.conda/envs/meta/lib/python3.10/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap fn(i, *args) File "/home/steven.hoang/vits/train.py", line 117, 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/steven.hoang/vits/train.py", line 190, in train_and_evaluate scaler.scale(loss_gen_all).backward() File "/home/steven.hoang/.conda/envs/meta/lib/python3.10/site-packages/torch/_tensor.py", line 363, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs) File "/home/steven.hoang/.conda/envs/meta/lib/python3.10/site-packages/torch/autograd/init.py", line 173, in backward Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass RuntimeError: view_as_complex is only supported for float and double tensors, but got a tensor of scalar type: Half File "/home/steven.hoang/vits/train.py", line 50, in main mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,)) File "/home/steven.hoang/vits/train.py", line 290, in main()

Ranzige commented 1 year ago

Hello, I have the same problem. Have you solved it

shoang22 commented 1 year ago

Yes, you need to use an older version of python (I used 3.7)

yyyyyyyyyl commented 10 months ago

hello,i uesd 3.7,but still happen this problelm.how can i solve it