#3353 TaskCfg(cache_folder='D:/pyVideoTran/win-pyvideotrans-v3.96-24/tmp/24544/8305fc1157', target_dir='D:/tkhub/downloads/_vi

138.2* Posted at: 1 day ago 👁17

配音阶段出错 [clone-voice(本地)] {'code': 6, 'msg': 'CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions. '}
Traceback (most recent call last):
File "videotrans\task\job.py", line 214, in run
File "videotrans\task\trans_create.py", line 677, in dubbing
File "videotrans\task\trans_create.py", line 953, in _tts
File "videotrans\tts\__init__.py", line 337, in run
File "videotrans\tts\_base.py", line 189, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_clone.py", line 70, in _run
RuntimeError: {'code': 6, 'msg': 'CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions. '}
TaskCfg(cache_folder='D:/pyVideoTran/win-pyvideotrans-v3.96-24/tmp/24544/8305fc1157', target_dir='D:/tkhub/downloads/_video_out/douyin_阳光科普_7572841804799624128-mp4', remove_noise=False, is_separate=False, detect_language='zh-cn', subtitle_language=None, source_language='简体中文', target_language='英语', source_language_code='zh-cn', target_language_code='en', source_sub='D:/tkhub/downloads/_video_out/douyin_阳光科普_7572841804799624128-mp4/zh-cn.srt', target_sub='D:/tkhub/downloads/_video_out/douyin_阳光科普_7572841804799624128-mp4/en.srt', source_wav='D:/pyVideoTran/win-pyvideotrans-v3.96-24/tmp/24544/8305fc1157/zh-cn.wav', source_wav_output='D:/tkhub/downloads/_video_out/douyin_阳光科普_7572841804799624128-mp4/zh-cn.m4a', target_wav='D:/pyVideoTran/win-pyvideotrans-v3.96-24/tmp/24544/8305fc1157/target.wav', target_wav_output='D:/tkhub/downloads/_video_out/douyin_阳光科普_7572841804799624128-mp4/en.m4a', subtitles='', novoice_mp4='D:/pyVideoTran/win-pyvideotrans-v3.96-24/tmp/24544/8305fc1157/novoice.mp4', noextname='douyin_阳光科普_7572841804799624128', shibie_audio=None, targetdir_mp4='D:/tkhub/downloads/_video_out/douyin_阳光科普_7572841804799624128-mp4/douyin_阳光科普_7572841804799624128.mp4', instrument=None, vocal=None, back_audio='', background_music=None, app_mode='biaozhun', subtitle_type=1, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='clone', copysrt_rawvideo=False, clear_cache=True, translate_type=5, tts_type=25, recogn_type=0, model_name='medium', voice_autorate=True, video_autorate=True, is_cuda=True, name='D:/tkhub/downloads/测试/douyin_阳光科普_7572841804799624128.mp4', basename='douyin_阳光科普_7572841804799624128.mp4', ext='mp4', dirname='D:/tkhub/downloads/测试', shound_del_name=None, uuid='8305fc1157', remove_silent_mid=False, align_sub_audio=True, enable_diariz=True, nums_diariz=1, rephrase=0, only_out_mp4=True, fix_punc=False, recogn2pass=True)


=
system:Windows-10-10.0.26200-SP0
version:v3.97
frozen:True
language:zh
root_dir:D:/pyVideoTran/win-pyvideotrans-v3.96-24

C:\Users\Administrator>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Fri_Feb_21_20:42:46_Pacific_Standard_Time_2025
Cuda compilation tools, release 12.8, V12.8.93
Build cuda_12.8.r12.8/compiler.35583870_0 我已经装过了CUDA12.8了 怎么还是不行

1 Replies

这是由于 clone-voice 本地 TTS 模型与您显卡的 CUDA 计算能力不兼容导致的。错误信息 no kernel image is available for execution on the device 表明模型编译时未包含对您显卡架构的支持。

  1. 检查显卡型号和计算能力

    • 在 CMD 中运行 nvidia-smi,查看您的显卡型号(例如 RTX 40xx, 50xx)。
    • 根据型号查询其 CUDA 计算能力(Compute Capability,简称 CC)。例如,RTX 4090 是 8.9,RTX 50 系列可能是 9.0+。
  2. 解决方案

    • 方案A:更新 PyTorch 版本:clone-voice 依赖的 PyTorch 版本可能过旧。尝试在软件根目录下,通过命令行升级 PyTorch 到与 CUDA 12.8 兼容且支持您显卡架构的版本。例如:
      pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
    • 方案B:使用其他配音渠道:clone-voice 对显卡和驱动要求较高。建议改用对硬件兼容性更好的渠道,例如:

      • Edge-TTS(免费在线,无需配置)。
      • F5-TTS(本地,需独立部署,兼容性通常更好)。
      • CosyVoice(本地,阿里开源,对中文支持好)。
    • 方案C:检查驱动:确保 NVIDIA 显卡驱动为最新版本。

注意:从日志看,您使用的是 v3.97 版本,但软件解压路径 D:/pyVideoTran/win-pyvideotrans-v3.96-24 包含版本号 v3.96,且路径中含有空格 pyVideoTran(应为 pyVideoTrans)。这可能导致不可预知的问题。请将软件解压到无空格、无中文的路径,例如 D:\pyVideoTrans

请查阅相关文档:

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.

Related resource

Similar issues already exist