#5531 videotrans.configure.excepts.DubbingSrtError: Audio denoising processing failed: CUDA out of memory. Tried to allocate 1

14.145* Posted at: 1 hour ago

Audio denoising processing failed: CUDA out of memory. Tried to allocate 108.00 MiB. GPU 0 has a total capacity of 8.00 GiB of which 0 bytes is free. Of the allocated memory 6.81 GiB is allocated by PyTorch, and 423.16 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):
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 16, in run
File "videotrans\tts\__init__.py", line 192, in run
File "videotrans\tts\_base.py", line 133, in run
videotrans.configure.excepts.DubbingSrtError: Audio denoising processing failed: CUDA out of memory. Tried to allocate 108.00 MiB. GPU 0 has a total capacity of 8.00 GiB of which 0 bytes is free. Of the allocated memory 6.81 GiB is allocated by PyTorch, and 423.16 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)


=
system:Windows-10-10.0.19045-SP0
version:v4.03
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v4.03-0622

1 Replies

显存已完全耗尽(8GB总容量中0字节空闲),PyTorch单独占用了6.81GB,无法再分配108MB给降噪处理。

解决方案:

  1. 关闭所有其他占用GPU的程序(浏览器、游戏等),并重启软件。
  2. 进入 菜单 → 工具 → 高级选项,按以下顺序操作:

    • 语音识别参数:将 计算数据类型 改为 int8(最省显存);若使用 faster-whisper(本地内置),将 模型large-v3 降为 mediumsmall
    • 通用设置:将 GPU同时任务数 设为 1,并关闭 多显卡模式
    • 字幕配音调整:将 人声背景分离线程数 降为 1
  3. 如果无需降噪,可取消勾选主界面 设置更多参数 中的 降噪

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update. Dondate: ko-fi.com/jianchang512

Related resource