#7156 Error during TTS dubbing stage [ChatterBox(Built-in)] CUDA error: device-side assert triggeredCompile with `TORCH_USE_CU

2804**bda2 Posted at: 11 hours ago

Error during TTS dubbing stage [ChatterBox(Built-in)] CUDA error: device-side assert triggered
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 156, in process_task

File "videotrans\task\_stage_dubbing.py", line 24, in dubbing

File "videotrans\task\_stage_dubbing.py", line 101, in _tts

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

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

File "videotrans\tts\_chatterbox.py", line 36, in _exec

File "chatterbox\mtl_tts.py", line 202, in from_local

ve.to(device).eval()

File "C:\Users\rgrBa\Documents\win-pyvideotrans-v4.11\_internal\torch\nn\modules\module.py", line 1355, in to

return self._apply(convert)

File "C:\Users\rgrBa\Documents\win-pyvideotrans-v4.11\_internal\torch\nn\modules\module.py", line 915, in _apply

module._apply(fn)

File "C:\Users\rgrBa\Documents\win-pyvideotrans-v4.11\_internal\torch\nn\modules\rnn.py", line 285, in _apply

ret = super()._apply(fn, recurse)

File "C:\Users\rgrBa\Documents\win-pyvideotrans-v4.11\_internal\torch\nn\modules\module.py", line 942, in _apply

param_applied = fn(param)

File "C:\Users\rgrBa\Documents\win-pyvideotrans-v4.11\_internal\torch\nn\modules\module.py", line 1341, in convert

return t.to(

RuntimeError: CUDA error: device-side assert triggered
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.
[TransCreate]翻译视频: self.is_copy_video=True,self.video_codec_num=264,self.is_audio_trans=False,self.video_info={'video_fps': 30.0, 'r_frame_rate': 30.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1920, 'height': 1080, 'time': 354333, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
[TaskCfgVTT]当前工作模式: 翻译视频 批量翻译模式
原始输入文件名: C:/Users/rgrBa/Downloads/2.1 - 003 Lesson.mp4,
输出结果保存到文件夹: D:/Unit Videos/- Junior Programmer -/2.1 - Player Positioning/2.1 - 003 Lesson-mp4,
临时文件夹: C:/Users/rgrBa/Documents/win-pyvideotrans-v4.11/tmp/14440/d06a2b1870
已选 清理已存在
已启用CUDA加速
未选 降噪
STT Service:faster-whisper(Built-in), large-v3-turbo, 发音语言: English, 断句方式:默认断句
TranslateSrt:Microsoft Translate (Free),原始语言:English,目标语言:Portuguese (Brazilian), 已选 SendSRT
TTS Service:ChatterBox(Built-in), 角色:clone, 配音语言:Portuguese (Brazilian), 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 已选 视频慢速
字幕: No Subtitles
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件
已选 仅输出mp4


=
system:Windows-10-10.0.26200-SP0
version:v4.11
frozen:True
language:en
root_dir:C:/Users/rgrBa/Documents/win-pyvideotrans-v4.11

1 Replies

#1 DeepSeek reply at 11 hours ago

This is a CUDA runtime error caused by data going out of range / insufficient resources being passed to the GPU at the moment the ChatterBox model is being loaded onto the device (ve.to(device).eval()). It is the same class of failure described for other local GPU TTS engines, and your configuration (ChatterBox + clone role + CUDA enabled) makes three things the most likely triggers.

Please do the following, in order:

  1. Check GPU memory is sufficient. ChatterBox runs on the GPU and heavily uses VRAM. Close other GPU-consuming programs, and make sure your NVIDIA card has enough free VRAM. If VRAM is tight, this error will be thrown during model load.
  2. Fix the clone reference-audio length (most common cause). You are using the clone voice role with "Separate vocal/BGM" enabled, so the reference audio is being cut dynamically from the original video. TTS clone engines require reference clips of roughly 3–10 seconds, otherwise the tensor values can go out of range and trigger this assert.

    • Go to Menu → Tools/Options → Advanced Options → Speech Recognition settings
    • Set Max speech duration (s) to 6–10
    • Set Min speech duration (ms) to 3000–4000
    • Re-run the translation.
  3. Update the version. You are on v4.11. This error pattern was patched; please upgrade to v4.12 (download the full package and overwrite), then retry.
  4. If it still fails, rule out a corrupted model download. Delete the ChatterBox model folder (软件目录/models/models--ResembleAI--chatterbox) and let it re-download fully. A partially downloaded model can also cause this error at load time. Note ChatterBox also needs the two extra files from github.com placed into 软件目录/models/pkuser_home (features.msgpack, weights.npz).
  5. Workaround while diagnosing: temporarily uncheck "Enable CUDA acceleration" on the main interface and run ChatterBox on CPU to confirm whether the problem is GPU-specific.

If none of the above resolves it, the next step is to re-check the model download integrity and share the latest log.

请查阅相关文档:

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