boy1dr / SpleeterGui

Windows desktop front end for Spleeter - AI source separation
Apache License 2.0
2.36k stars 254 forks source link

Running on GPU #7

Closed therealmgo closed 4 years ago

therealmgo commented 4 years ago

The GUI is very helpful, but it seems to only use CPU power. I have a GeForce and would much rather have Spleeter run on the GPU. Is there any way to change the processing to run on the GPU?

boy1dr commented 4 years ago

it can be done, but i'm not going to recommend it. for all of the hassle you are about to go through it won't actually save you any time separating audio. maybe 5-10 seconds per track if your lucky. you will need an nvidia account (developer account)

download and install the NVidia CUDA Toolkit 10.0 https://developer.nvidia.com/cuda-10.0-download-archive (2GB) (i didn't install driver, just the toolkit)

Download https://developer.nvidia.com/cudnn (240MB) extract it to C:\cuda add "C:\cuda\bin" to your path environment variable.

open a command window to the SpleeterGUI appdata python folder, mine is located here C:\Users\chris\AppData\Roaming\SpleeterGUI\python

run the following command python -m pip install --default-timeout=100 spleeter-gpu

If all has gone well you can just use SpleeterGUI as normal and your GPU will do the processing. If there's a problem it will tell you in the text window in the bottom of SpleeterGUI, just follow instructions in the errors or google them to figure out how to fix it. that pip install command took several attempts for me because the pip service was not available when i tried, after about 15 minutes it eventually succeeded.

i'm not an expert with spleeter or python, the instructions i have provided here worked for me but i cannot say if it will work for you.

i'm not going to recommend doing this.

Hope it works for you, Best of luck :)