#7503 mkl_malloc: failed to allocate memory:Traceback (most recent call last): File

124.89**2 Posted at: 2 hours ago

mkl_malloc: failed to allocate memory:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 130, in faster_whisper
File "faster_whisper\transcribe.py", line 1851, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1190, in generate_segments
File "faster_whisper\transcribe.py", line 1400, in encode
RuntimeError: mkl_malloc: failed to allocate memory

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 70, in run
File "videotrans\task\_stage_recogn.py", line 65, in recogn
File "videotrans\recognition\__init__.py", line 233, in run
File "videotrans\recognition\_base.py", line 99, in run
File "videotrans\recognition\_whisper.py", line 41, in _exec
File "videotrans\recognition\_whisper.py", line 130, in _faster
File "videotrans\configure\base.py", line 264, in _new_process
videotrans.configure.excepts.VideoTransError: mkl_malloc: failed to allocate memory:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 130, in faster_whisper
File "faster_whisper\transcribe.py", line 1851, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1190, in generate_segments
File "faster_whisper\transcribe.py", line 1400, in encode
RuntimeError: mkl_malloc: failed to allocate memory

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/84988/Desktop/20250922_c7be04ec84cf8423_535056910374_331012226713630_published_mp4_264_hd_taobao.mp4,
输出结果保存到文件夹: C:/Users/84988/Desktop/_video_out/20250922_c7be04ec84cf8423_535056910374_331012226713630_published_mp4_264_hd_taobao-mp4,
临时文件夹: D:/视频英文翻译工具/模型/tmp/82296/bf8936b260
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 简体中文, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:简体中文,目标语言:俄语, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Svetlana(Female/RU), 配音语言:俄语, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: 嵌入硬字幕
video_duration_ms=58400


=
system:Windows-10-10.0.26200-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:D:/视频英文翻译工具/模型

1 Replies

#1 DeepSeek reply at 2 hours ago

核心原因:内存(RAM)分配失败,非显存问题。当前未启用CUDA加速,faster-whisperlarge-v3-turbo 模型在纯CPU(MKL加速)运算时需要较大量级的内存,物理内存不足或被其他程序占用过多即会抛出 RuntimeError: mkl_malloc: failed to allocate memory

解决方案(按优先级):

  1. 换用小模型:主界面 > 语音识别 > 模型下拉,将 large-v3-turbo 改为 smallbase,内存占用大幅降低。
  2. 关闭其他占用内存的程序,或增大系统虚拟内存(页面文件)。
  3. 若有NVIDIA显卡,配置好 CUDA 12.8 + cuDNN 9.11 后勾选启用CUDA加速,可将运算从内存转移到显存。
  4. 高级选项 > 语音识别参数 > 将计算数据类型设为 int8,进一步降低内存占用。
  5. 减少同时任务数:高级选项 > 通用 > CPU同时任务数 设为 1。
注意:您当前未启用CUDA加速,large-v3-turbo 纯CPU运行本身就极其吃内存,容易触发此错误。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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 via ko-fi.com

Related resource