#7645 语音识别阶段出错[Qwen-ASR(内置)] CUDA error: an illegal memory access was encounteredCompile with `TORCH_USE_CUDA_DSA` to enable d

2404**3de7 Posted at: 1 hour ago

语音识别阶段出错[Qwen-ASR(内置)] CUDA error: an illegal memory access was encountered
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.
:Traceback (most recent call last):
File "videotrans\process\stt_qwen.py", line 83, in qwen3asr_fun
File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\transformers\generation\utils.py", line 2645, in generate

result = decoding_method(

File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\transformers\generation\utils.py", line 2845, in _sample

outputs = self._prefill(

File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\transformers\generation\utils.py", line 3896, in _prefill

return self(**model_inputs, return_dict=True)

File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl

return self

......
)
File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\torch\nn\modules\module.py", line 1762, in _call_impl

return forward_call(*args, **kwargs)

File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\transformers\utils\output_capturing.py", line 252, in wrapper

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

File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\transformers\models\qwen3_asr\modeling_qwen3_asr.py", line 407, in forward

conv_out = F.gelu(self.conv2d2(conv_out))

File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl

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

File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\torch\nn\modules\module.py", line 1762, in _call_impl

return forward_call(*args, **kwargs)

File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\torch\nn\modules\conv.py", line 554, in forward

return self._conv_forward(input, self.weight, self.bias)

File "C:\Users\Ricky\Desktop\win-pyvideotrans\_internal\torch\nn\modules\conv.py", line 549, in _conv_forward

return F.conv2d(

RuntimeError: CUDA error: an illegal memory access was encountered
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

self.cfg=[TaskCfgVTT]当前工作模式: 转录并翻译字幕

临时文件夹: C:/Users/Ricky/Desktop/win-pyvideotrans/tmp/22672/0cbe037058
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:Qwen-ASR(内置), 0.6B, 发音语言: 日语, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:日语,目标语言:粤语, 已选 发送完整字幕
输出字幕格式: 单字幕


=
system:Windows-10-10.0.26200-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:C:/Users/Ricky/Desktop/win-pyvideotrans

1 Replies

#1 DeepSeek reply at 1 hour ago

This is a GPU-level CUDA crash inside the Qwen-ASR(内置) model's audio encoder (conv2d layer), not a logic error in pyVideoTrans. It is caused by one of: insufficient/borderline VRAM, CUDA/cuDNN version mismatch, an unstable GPU driver, or a corrupted/incomplete model download. Note also your source video is wmv3/wmapro, an unusual codec, which may produce odd audio tensors.

Try the following in order:

  1. Reduce GPU load for this channel:

    • Menu → Tools/Options → Advanced Options → Common: set GPU同时任务数 to 1 (requires restart).
    • Advanced Options → ASR Settings: set 计算数据类型 to float16, set beam_size and best_of to 1, and disable 启用上下文感知.
  2. Switch the Qwen-ASR model from 0.6B to the other available size (or vice versa). A partial/corrupt model download frequently causes this exact CUDA crash — delete the model folder and let it re-download:

    • 软件目录/models/models--Qwen--Qwen3-ASR-0.6B
    • 软件目录/models/models--Qwen--Qwen3-ASR-1.7B
      Manual download links are in the knowledge base (aboutmodels).
  3. Verify GPU environment: NVIDIA card only; CUDA Toolkit 12.8+ and cuDNN 9.11+, with CUDA bin/lib added to system PATH. Update the NVIDIA driver to the latest version.
  4. Test with CUDA off (uncheck 启用CUDA加速) to confirm whether it is GPU-specific. Also test with a simple MP4/H.264 video — your wmv3 file is unusual and may itself trigger the crash.
  5. If it still fails on GPU, use an alternative ASR channel for Japanese: faster-whisper(内置) with large-v3, or Nemotron-3.5-asr-0.6b(内置) (supports Japanese).

If the error persists after all the above, provide the newest log file from the logs/ folder (copy the last ~30 lines) and state your GPU model and VRAM size.

请查阅相关文档:

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