Vaibhavs10 / insanely-fast-whisper

Apache License 2.0
6.94k stars 505 forks source link

Keep getting an error that torch is not compiled with CUDA, why? #145

Closed hawkeyecz closed 6 months ago

hawkeyecz commented 6 months ago

..\AUDIO>insanely-fast-whisper --file-name "test file.mp4"

C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\pyannote\audio\core\io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call. torchaudio.set_audio_backend("soundfile") C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\torch_audiomentations\utils\io.py:27: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call. torchaudio.set_audio_backend("soundfile") Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. Traceback (most recent call last): File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "c:\users\xxxxxx.local\bin\insanely-fast-whisper.exe__main.py", line 7, in File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\insanely_fast_whisper\cli.py", line 94, in main pipe = pipeline( File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\transformers\pipelines__init__.py", line 1070, in pipeline return pipeline_class(model=model, framework=framework, task=task, **kwargs) File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\transformers\pipelines\automatic_speech_recognition.py", line 239, in init self.model.to(device) File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\transformers\modeling_utils.py", line 2460, in to return super().to(*args, **kwargs) File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\torch\nn\modules\module.py", line 1160, in to return self._apply(convert) File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\torch\nn\modules\module.py", line 833, in _apply param_applied = fn(param) File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\torch\nn\modules\module.py", line 1158, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking) File "C:\Users\xxxxxx\AppData\Local\pipx\pipx\venvs\insanely-fast-whisper\lib\site-packages\torch\cuda\init__.py", line 289, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled


import torch print("Is cuda available:", torch.cuda.is_available())

print(torch.cuda.current_device())

print(torch.cuda.device(0))

print(torch.cuda.device_count())

print(torch.cuda.get_device_name(0))

output->

Is cuda available: True 0 <torch.cuda.device object at 0x000001298F509300> 1 NVIDIA GeForce RTX 3060


pip show torch Name: torch Version: 2.1.2+cu121

Thank you for your help.

hawkeyecz commented 6 months ago

Missing transformers. After installing its working