collabora / WhisperSpeech

An Open Source text-to-speech system built by inverting Whisper.
https://collabora.github.io/WhisperSpeech/
MIT License
3.54k stars 185 forks source link

torch inference mode please #142

Open BBC-Esq opened 1 month ago

BBC-Esq commented 1 month ago

I noticed that "no grad" is used throughout the script. The newer "inference mode" is better if you're just running inference. Is it possible to use this or would it interfere too much with some of the scripts that are used for training purposes? Possible to use both depending on running inference versus training? Thanks.

For your reference:

https://pytorch.org/docs/stable/generated/torch.autograd.grad_mode.inference_mode.html