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

13.231**0 Posted at: 2 hours ago

mkl_malloc: failed to allocate memory,Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 54, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 54, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 84, in faster_whisper
File "videotrans\process\stt_faster.py", line 67, in _create_model
File "videotrans\process\stt_faster.py", line 77, in _create_model
File "videotrans\process\stt_faster.py", line 54, in _create_model
File "faster_whisper\transcribe.py", line 689, in __ini
......
ate memory,Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 54, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 54, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 84, in faster_whisper
File "videotrans\process\stt_faster.py", line 67, in _create_model
File "videotrans\process\stt_faster.py", line 77, in _create_model
File "videotrans\process\stt_faster.py", line 54, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

trk=[TransCreate]: uuid='6a0db357af', proxy_str='http://127.0.0.1:7897', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/浏览器视频下载/1.1.mp4,
输出结果保存到文件夹: D:/浏览器视频下载/_video_out/1.1-mp4,
临时文件夹: D:/浏览器视频下载/win-pyvideotrans-v4.16/tmp/43036/6a0db357af
已选 清理已存在
已启用CUDA加速
未选 降噪
已选 识别说话人,最大说话人数量2
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 简体中文,
翻译渠道:Google(免费),原始语言:简体中文,目标语言:英语, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Andrew(Male/US), 配音语言:英语, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: 嵌入硬字幕
代理地址: http://127.0.0.1:7897, precent=4, hasend=False, should_recogn=True, should_trans=True, should_dubbing=True, should_hebing=True, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=True
video_duration_ms=157338


=
system:Windows-10-10.0.22631-SP0
version:v4.16
frozen:True
language:zh_CN
root_dir:D:/浏览器视频下载/win-pyvideotrans-v4.16

1 Replies

#1 DeepSeek reply at 2 hours ago

这是模型加载阶段内存分配失败:mkl_malloc: failed to allocate memory 表示 faster-whisper 在初始化 large-v3-turbo 模型时申请的内存(系统内存 MKL 或显存)被系统拒绝,通常是内存或显存不足,或模型文件下载不完整导致加载异常。

按以下顺序排查处理:

1. 降低模型体积(最有效)

  • 主界面 语音识别 渠道保持 faster-whisper(内置),将模型从 large-v3-turbo 换为 medium 或 small;large-v3-turbo 约需 6GB 显存,large-v3 约需 8GB。

2. 降低计算精度与搜索深度

  • 打开 菜单 → 工具/选项 → 高级选项 → 语音识别参数:

    • 计算数据类型:float32 改为 float16(有 GPU 时)或 int8(最省资源)。
    • 识别准确度beam_size 与 best_of:由 5 改为 1。
    • 启用上下文感知:取消勾选。

3. 减少并发与额外占用

  • 同一面板中 GPU同时任务数[重启生效] 必须设为 1,修改后重启软件。
  • 关闭其他占用内存/显存的程序(浏览器、其他 AI 软件等)。
  • 你已勾选 识别说话人,说话人分离会额外占用资源,可先取消该选项测试是否恢复。

4. 检查模型文件是否完整
若更换小模型后仍报同样错误,说明模型文件可能下载不完整(大文件下载中断常见),请:

  • 删除 软件目录/models/models--mobiuslabsgmbh--faster-whisper-large-v3-turbo(或对应模型目录),重新让软件下载,或按手动下载地址重新下载完整文件覆盖。

5. 检查系统内存/虚拟内存
mkl_malloc 多为系统物理内存不足所致,建议确认任务管理器内存占用是否接近上限,可适当增大 Windows 虚拟内存,并避免同时运行多个视频任务。

请查阅相关文档:

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