BoltzmannEntropy / xtts2-ui

A User Interface for XTTS-2 Text-Based Voice Cloning using only 10 seconds of speech
MIT License
242 stars 40 forks source link

AssertionError: Torch not compiled with CUDA enabled #28

Open 0wwafa opened 3 months ago

0wwafa commented 3 months ago

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

0wwafa commented 3 months ago

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.

markusbkk commented 3 weeks ago

If you change this line to device = torch.device('cpu') it'll work.