kadirnar / whisper-plus

WhisperPlus: Faster, Smarter, and More Capable 🚀
Apache License 2.0
1.67k stars 133 forks source link

RuntimeError: CUDA error: device-side assert triggered #69

Closed JeremyXXXuuu closed 4 months ago

JeremyXXXuuu commented 5 months ago

I followed the steps of "Youtube URL to Audio", The first time I ran it successfully, the second time it failed, the following error occurred, :

from whisperplus import SpeechToTextPipeline, download_and_convert_to_mp3

url = "https://www.youtube.com/watch?v=7S-2XKufdus&ab_channel=MitchAsser"
audio_path = download_and_convert_to_mp3(url)
pipeline = SpeechToTextPipeline(model_id="openai/whisper-large-v3")
transcript = pipeline(audio_path, "openai/whisper-large-v3", "english")

print(transcript)

RuntimeError                              Traceback (most recent call last)
[<ipython-input-40-cf07cfb4f81e>](https://localhost:8080/#) in <cell line: 5>()
      3 url = "https://www.youtube.com/watch?v=7S-2XKufdus&ab_channel=MitchAsser"
      4 audio_path = download_and_convert_to_mp3(url)
----> 5 pipeline = SpeechToTextPipeline(model_id="openai/whisper-large-v3")
      6 transcript = pipeline(audio_path, "openai/whisper-large-v3", "english")
      7 

7 frames
[/usr/local/lib/python3.10/dist-packages/torch/cuda/memory.py](https://localhost:8080/#) in empty_cache()
    160     """
    161     if is_initialized():
--> 162         torch._C._cuda_emptyCache()
    163 
    164 

RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
GPU 0: Tesla T4 (UUID: GPU-ea2578e1-f112-e896-e103-fae036848bcb)
Thu Mar 28 16:33:50 2024       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.05             Driver Version: 535.104.05   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  Tesla T4                       Off | 00000000:00:04.0 Off |                    0 |
| N/A   69C    P0              29W /  70W |  10449MiB / 15360MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
+---------------------------------------------------------------------------------------+

In google colab

sikamedia commented 4 months ago
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Please check your Graphic card, and install proper CUDA run-time packages (libs) . By the way, what OS do you use?

kadirnar commented 4 months ago

Delete the Torch package and reinstall it.