#7060 [enforce fail at alloc_cpu.cpp:116] data. DefaultCPUAllocator: not enough memory: you tried to allocate 13200199680 byte

112.47**1 Posted at: 2 hours ago

[enforce fail at alloc_cpu.cpp:116] data. DefaultCPUAllocator: not enough memory: you tried to allocate 13200199680 bytes.:Traceback (most recent call last):
File "videotrans\process\stt_qwen.py", line 56, in qwen3asr_fun
File "D:\AI\pyvideotrans\_internal\torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "qwen_asr\inference\qwen3_asr.py", line 383, in transcribe

raw_outputs = self._infer_asr(chunk_ctx, chunk_wavs, chunk_lang)

File "qwen_asr\inference\qwen3_asr.py", line 485, in _infer_asr

return self._infer_asr_transformers(contexts, wavs, languages)

File "qwen_asr\inference\qwen3_asr.py", line 510, in _infer_asr_transformers

text_ids = self.model.generate(**inputs, max_new_tokens=self.max_new_tokens)

File "D:\AI\pyvideotrans\_internal\torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "qwen_asr\core\transformers_backend\modeling_qwen3_asr.py", line 1353,
......
=True, **thinker_kwargs)
File "D:\AI\pyvideotrans\_internal\torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "D:\AI\pyvideotrans\_internal\transformers4576\generation\utils.py", line 2566, in generate

result = decoding_method(

File "D:\AI\pyvideotrans\_internal\transformers4576\generation\utils.py", line 2786, in _sample

outputs = self(**model_inputs, return_dict=True)

File "D:\AI\pyvideotrans\_internal\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl

return self._call_impl(*args, **kwargs)

File "D:\AI\pyvideotrans\_internal\torch\nn\modules\module.py", line 1762, in _call_impl

return forward_call(*args, **kwargs)

File "D:\AI\pyvideotrans\_internal\transformers4576\utils\generic.py", line 918, in wrapper

output = func(self, *args, **kwargs)

File "qwen_asr\core\transformers_backend\modeling_qwen3_asr.py", line 1241, in forward

logits = self.lm_head(hidden_states)

File "D:\AI\pyvideotrans\_internal\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl

return self._call_impl(*args, **kwargs)

File "D:\AI\pyvideotrans\_internal\torch\nn\modules\module.py", line 1762, in _call_impl

return forward_call(*args, **kwargs)

File "D:\AI\pyvideotrans\_internal\torch\nn\modules\linear.py", line 125, in forward

return F.linear(input, self.weight, self.bias)

RuntimeError: [enforce fail at alloc_cpu.cpp:116] data. DefaultCPUAllocator: not enough memory: you tried to allocate 13200199680 bytes.

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: G:/viedo/sex/福冈/FC2PPV 4786921.mp4,
输出结果保存到文件夹: G:/viedo/sex/福冈/_video_out/FC2PPV 4786921-mp4,
临时文件夹: D:/AI/pyvideotrans/tmp/18948/18a97f3a2b
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:Qwen-ASR(内置), 1.7B, 发音语言: 日语, 断句方式:默认断句
翻译渠道:兼容AI/本地模型,原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕


=
system:Windows-10-10.0.22631-SP0
version:v4.09
frozen:True
language:zh
root_dir:D:/AI/pyvideotrans

1 Replies

#1 DeepSeek reply at 2 hours ago

这是系统物理内存不足导致的。日志明确显示 DefaultCPUAllocator: not enough memory: you tried to allocate 13200199680 bytes,即程序尝试分配 13.2GB 内存失败。你当前使用的是 Qwen-ASR(内置) 1.7B 模型,且未启用 CUDA 加速(纯 CPU 运行),该模型在 CPU 推理时需要消耗大量内存,远超可用内存。

解决方案

  1. 降低模型尺寸(首选)

    • Qwen-ASR 支持 0.6B 模型,切换到 0.6B 可大幅降低内存需求(约减少 60%~70%)。
    • 在语音识别渠道选中 Qwen-ASR(内置) 后,模型下拉框切换为 0.6B
  2. 启用 CUDA 加速(若你有 NVIDIA 显卡)

    • 需确保已安装 CUDA 12.8+cuDNN 9.11+
    • 主界面勾选 CUDA加速,显存充足时内存压力会转移到 GPU 上。
  3. 关闭其他内存占用高的程序

    • 运行前关闭浏览器、大型游戏、虚拟机等,确保系统剩余可用内存至少 16GB 以上。
  4. 更换为更轻量的识别渠道(备选)

    • 日语视频可尝试 openai-whisper(内置) large-v3parakeet日语(内置),配合 CUDA 或使用更小的 medium/small 模型。
  5. 降低同时任务数

    • 菜单 → 工具 → 高级选项 → 通用设置,将 CPU同时任务数 设为 1(降低并发内存竞争)。

请查阅相关文档:

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