#4714 TaskCfgVTT(uuid='0aca5a80c6', name='E:/-076-C.mp4', dirname='E:/', noextname='-076-C', basename='-076-C.mp4', ext='mp4',

2409:8a6a* Posted at: 3 hours ago

[ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running LSTM node. Name:'/decoder/rnn/LSTM' Status Message: bad allocation:Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 283, in faster_whisper
File "faster_whisper\transcribe.py", line 890, in transcribe
File "faster_whisper\vad.py", line 98, in get_speech_timestamps
File "faster_whisper\vad.py", line 377, in call
File "onnxruntime\capi\onnxruntime_inference_collection.py", line 287, in run

self._validate_input(list(input_dict_ort_values.keys()))

onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running LSTM node. Name:'/decoder/rnn/LSTM' Status Message: bad allocation

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 47, in run
File "videotrans\task\trans_create.py", line 320, in recogn
File "videotrans\recognition\__init__.py", line 188, in run
File "videotrans\recognition\_base.py", line 93, in run
File "videotrans\recognition\_whisper.py", line 35, in _exec
File "videotrans\recognition\_whisper.py", line 108, in _faster
File "videotrans\configure\base.py", line 240, in _new_process
videotrans.configure.excepts.VideoTransError: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running LSTM node. Name:'/decoder/rnn/LSTM' Status Message: bad allocation:Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 283, in faster_whisper
File "faster_whisper\transcribe.py", line 890, in transcribe
File "faster_whisper\vad.py", line 98, in get_speech_timestamps
File "faster_whisper\vad.py", line 377, in call
File "onnxruntime\capi\onnxruntime_inference_collection.py", line 287, in run

self._validate_input(list(input_dict_ort_values.keys()))

onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running LSTM node. Name:'/decoder/rnn/LSTM' Status Message: bad allocation
TaskCfgVTT(uuid='0aca5a80c6', name='E:/RBK-076-C.mp4', dirname='E:/', noextname='RBK-076-C', basename='RBK-076-C.mp4', ext='mp4', target_dir='E:/aaa/RBK-076-C-mp4', cache_folder='E:/win-pyvideotrans-v4.00-525/tmp/109912/0aca5a80c6', is_cuda=True, source_language='日语', source_language_code='ja', source_sub='E:/aaa/RBK-076-C-mp4/ja.srt', source_wav='E:/win-pyvideotrans-v4.00-525/tmp/109912/0aca5a80c6/ja.wav', source_wav_output='E:/aaa/RBK-076-C-mp4/ja.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='E:/aaa/RBK-076-C-mp4/zh-cn.srt', target_wav='E:/win-pyvideotrans-v4.00-525/tmp/109912/0aca5a80c6/target.wav', target_wav_output='E:/aaa/RBK-076-C-mp4/zh-cn.m4a', translate_type=2, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='ja', recogn_type=0, model_name='large-v3', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False, subtitle_language=None, app_mode='biaozhun', subtitles='', targetdir_mp4='E:/aaa/RBK-076-C-mp4/RBK-076-C.mp4', novoice_mp4='E:/win-pyvideotrans-v4.00-525/tmp/109912/0aca5a80c6/novoice.mp4', is_separate=False, embed_bgm=True, instrument=None, vocal='E:/win-pyvideotrans-v4.00-525/tmp/109912/0aca5a80c6/vocal.wav', clear_cache=True, background_music='', subtitle_type=2, only_out_mp4=False, recogn2pass=False, output_srt=2, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8)


=
system:Windows-10-10.0.19045-SP0
version:v4.00
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v4.00-525

1 Replies

这是由于显存不足(bad allocation)导致的。当前使用的是 large-v3 大模型并启用了 CUDA 加速,对显卡显存要求较高,当显存不够时 ONNX 后端会分配失败。

解决办法:

  1. 调小 ASR 模型:在主界面将语音识别模型从 large-v3 切换为 mediumsmall
  2. 优化显存占用:打开菜单 → 工具/选项 → 高级选项 → 语音识别参数

    • CUDA数据类型 设为 float16int8
    • beam_sizebest_of 均设为 1
    • 启用上下文感知 设为 False
    • 勾选 Whisper预分割音频
  3. 关闭不必要的选项:确保主界面右上角二次识别未被勾选(日志中 recogn2pass=False 已满足)。
  4. 减少并发:如果同时处理多个视频,在高级选项中将GPU同时任务数设为 1

请查阅相关文档:

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.

Related resource