xtts2-ui
xtts2-ui copied to clipboard
AssertionError: Torch not compiled with CUDA enabled
I did everything in the README. (I am using CPU only)
When running python app.py I get: AssertionError: Torch not compiled with CUDA enabled
According to stackoverflow:
You are using CPU only pytorch, but your code has statement like cr = nn.CrossEntropyLoss(weight=torch.tensor(classes_weights).cuda()) which is trying to move the tensor to GPU.
To fix it, remove all the .cuda() operations.
If you change this line to device = torch.device('cpu') it'll work.