#842 RuntimeError: {'code': 6, 'msg': 'CUDA error: no kernel image is available for execution on the device\nCUDA kernel erro

*171.158* Posted at: 3 hours ago 👁10

{'code': 6, 'msg': 'CUDA error: no kernel image is available for execution on the device\nCUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1.\nCompile with TORCH_USE_CUDA_DSA to enable device-side assertions.\n'}CloneVoice:Traceback (most recent call last):

File "videotrans\util\ListenVoice.py", line 18, in run

File "videotrans\tts\__init__.py", line 480, in run

File "videotrans\tts\_base.py", line 142, in run

RuntimeError: {'code': 6, 'msg': 'CUDA error: no kernel image is available for execution on the device\nCUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1.\nCompile with TORCH_USE_CUDA_DSA to enable device-side assertions.\n'}CloneVoice

=====

Windows-10-10.0.26200-SP0

version:v3.80

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
这个错误表明您的显卡驱动或CUDA版本与pyVideoTrans软件不兼容,导致无法使用GPU加速功能。

问题原因:

CUDA error: no kernel image is available for execution on the device 错误通常发生在:

1. 显卡驱动过旧,不支持当前软件所需的CUDA版本

2. 安装的CUDA Toolkit版本与软件要求不匹配

3. 显卡型号较老,无法支持CUDA 12.x版本

解决方案:

方法一:更新显卡驱动和CUDA(推荐)

1. 更新NVIDIA显卡驱动:前往NVIDIA官网下载并安装最新的驱动程序

2. 安装CUDA 12.x版本:从NVIDIA官网下载CUDA 12.x Toolkit并安装

3. 检查兼容性:在命令行执行 nvidia-smi 查看驱动支持的CUDA版本

方法二:禁用CUDA加速

如果您的显卡确实无法支持CUDA 12.x:

1. 在软件界面中取消选中"CUDA加速"选项

2. 软件将自动回退到CPU模式运行,虽然速度较慢但可以正常使用

验证安装:

安装完成后,可通过命令行执行 nvcc --version 检查当前CUDA版本。

如果问题仍然存在,建议查看软件目录下 logs 文件夹中的详细日志文件,获取更多调试信息。

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions