-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whisper defaults to CPU instead of utilizing Nvidia GPU on Windows 11 #4
Comments
Interesting, on my Linux machine it was using the GPU right out of the gate just with |
Oh and If it helps, this is a fresh install of Windows 11 and I actually used that very same command to install whisper following Python 3.12. Strange indeed. |
Are you still having this issue any, I tried your steps and mine persisted. |
Right now I don't have access to a Windows machine with a GPU, so I don't have any way to confirm or look into this. |
Sorry to hear. It's been working just fine ever since. Could you provide more info about your setup? Operating system, whether you tried |
Windows 11, getting the exact same error messages as you get in your original one. I'm currently just using a separate whisper program instead so no big deal, and yes torch returns true. |
For windows, I had to install an Nvidia triton windows compiler build from here : https://huggingface.co/madbuda/triton-windows-builds If you have CUDA 12.6 or higher, this bugfix needs to be applied also. https://github.com/triton-lang/triton/pull/4588/files (see the changed files tabs and note the added and removed lines) For me, the file I had to edit was located in After this and doing the pytorch CUDA re-install, it worked for Windows. Thanks for creating this and I hope this info can help someone. |
A warning upon first running the
whisper
model clued me in to it not using hardware acceleration:All I had to do in order to enable CUDA support was first uninstall Torch:
python -m pip3 uninstall torch
And reinstall with this command:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
Confirm that CUDA is available in Python by running:
import torch
torch.cuda.is_available()
monkeyplug/whisper should now correctly use your GPU to significantly speed up operations. A youtube video with a runtime of 10:42 took 13 minutes and 42 seconds to process on my CPU with the
medium.en
model. After successfully enabling CUDA support, that same video took 3 minutes and 13 seconds to process on an RTX 3070. With noticeable accuracy over the defaultbase.en
.I caught several warning messages that were raised during a job (might be related to generating timestamps?), but they don't seem to affect the operation at all:
Noticed that #3 might be in the works, which might help, but I thought it could be wise/helpful to share my findings regardless in the meantime.
PS: Whisper really is another tier of accuracy and is much appreciated.
The text was updated successfully, but these errors were encountered: