FunAudioLLM / SenseVoice

Multilingual Voice Understanding Model
https://funaudiollm.github.io/
Other
3.35k stars 307 forks source link

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 214.66 GiB. #7

Closed jony4 closed 4 months ago

jony4 commented 4 months ago

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 214.66 GiB.

需要 214.66 G 显存?

jony4 commented 4 months ago

我是 load 了一个 400M 的 wav 文件,显存崩溃。

同样文件在 whisper 时候,是可以 load 进入。不知道这里边有什么本质性差别。

暂时先用切割方式一块块的处理 wav 文件了

LauraGPT commented 4 months ago

Please ref to this doc: https://github.com/FunAudioLLM/SenseVoice?tab=readme-ov-file#method-2

bitiliu commented 4 months ago

The same issue occurs when I try to process a 1-hour MP3 file (approximately 14MB), throwing an exception:

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 53.66 GiB. GPU 0 has a total capacity of 21.99 GiB of which 19.61 GiB is free. Including non-PyTorch memory, this process has 2.37 GiB memory in use. Of the allocated memory 1.99 GiB is allocated by PyTorch, and 92.67 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

I don't want to enable VAD as it sometimes leads to information loss. Are there any other solutions?