We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import traceback from faster_whisper import WhisperModel import multiprocessing as mp import torch if __name__ == "__main__": torch.cuda.is_available() def sub(): try: w = WhisperModel( model_size_or_path="tiny", device="cuda", compute_type="float32" ) except: traceback.print_exc() finally: exit(0) try: p = mp.Process( target=sub, ) p.start() p.join() finally: p.terminate()
Run this script will produce
self.model = ctranslate2.models.Whisper( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: CUDA failed with error initialization error
cuda can not be re-initialized in a forked subprocess. CUDA Multiprocessing ISSUE
Faster whisper check if cuda already initialized before do it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How to reproduce:
Run this script will produce
The reason
cuda can not be re-initialized in a forked subprocess.
CUDA Multiprocessing ISSUE
Suggestion
Faster whisper check if cuda already initialized before do it.
The text was updated successfully, but these errors were encountered: