daswer123 / xtts-api-server

A simple FastAPI Server to run XTTSv2
MIT License
419 stars 100 forks source link

How do I set it so it runs on the GPU? #15

Closed GGame666 closed 1 year ago

GGame666 commented 1 year ago

I realize it is probably a dumb question but I can't figure out how to run it on my GPU. I am running it on Windows

daswer123 commented 1 year ago

Hi, make sure you have torch installed with support for CUDA. pip install torch==2.1.1.1+cu118 torchaudio==2.1.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118

If you don't have CUDA on your system, follow this guide https://github.com/KoljaB/RealtimeTTS#cuda-installation

GGame666 commented 1 year ago

Would there be a problem if I installed the first common (pip install xtts-api-server) first and then this one (python -m venv venv venv\Scripts\activate pip install xtts-api-server pip install torch==2.1.1+cu118 torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118)

daswer123 commented 1 year ago

It's okay, there shouldn't be a problem

GGame666 commented 1 year ago

Thank you it works but I don't know what caused it but it was probably that I ran the cmd from that tasks bar and not from the folder. but either way thank you for the fast responses