#3080 TaskCfg(cache_folder='D:/Program Files/win-pyvideotrans-v3.96/tmp/12268/140f727615', target_dir='E:/DownLoads/DCL/_video

240e:44d* Posted at: 16 hours ago 👁15

语音识别阶段出错 [openai-whisper(本地)] Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 78, in openai_whisper
File "whisper\transcribe.py", line 295, in transcribe
File "whisper\transcribe.py", line 201, in decode_with_fallback
File "torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "whisper\decoding.py", line 824, in decode
File "torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "whisper\decoding.py", line 737, in run
File "whisper\decoding.py", line 703, in _main_loop
File "whisper\decoding.py", line 283, in update
File "torch\distributions\categorical.py", line 73, in init

super().__init__(batch_shape, validate_args=validate_args)

File "torch\distributions\distribution.py", line 72, in init

raise ValueError(

ValueError: Expected parameter logits (Tensor of shape (1, 51866)) of distribution Categorical(logits: torch.Si
......
([1, 51866])) to satisfy the constraint IndependentConstraint(Real(), 1), but found invalid values:
tensor([[nan, nan, nan, ..., nan, nan, nan]], device='cuda:0')

Traceback (most recent call last):
File "videotrans\task\job.py", line 106, in run
File "videotrans\task\trans_create.py", line 358, in recogn
File "videotrans\recognition\__init__.py", line 284, in run
File "videotrans\recognition\_base.py", line 141, in run
File "videotrans\recognition\_overall.py", line 61, in _exec
File "videotrans\recognition\_overall.py", line 106, in _openai
File "videotrans\configure\_base.py", line 276, in _new_process
RuntimeError: Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 78, in openai_whisper
File "whisper\transcribe.py", line 295, in transcribe
File "whisper\transcribe.py", line 201, in decode_with_fallback
File "torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "whisper\decoding.py", line 824, in decode
File "torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "whisper\decoding.py", line 737, in run
File "whisper\decoding.py", line 703, in _main_loop
File "whisper\decoding.py", line 283, in update
File "torch\distributions\categorical.py", line 73, in init

super().__init__(batch_shape, validate_args=validate_args)

File "torch\distributions\distribution.py", line 72, in init

raise ValueError(

ValueError: Expected parameter logits (Tensor of shape (1, 51866)) of distribution Categorical(logits: torch.Size([1, 51866])) to satisfy the constraint IndependentConstraint(Real(), 1), but found invalid values:
tensor([[nan, nan, nan, ..., nan, nan, nan]], device='cuda:0')
TaskCfg(cache_folder='D:/Program Files/win-pyvideotrans-v3.96/tmp/12268/140f727615', target_dir='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4', remove_noise=False, is_separate=False, detect_language='en', subtitle_language=None, source_language='英语', target_language='简体中文', source_language_code='en', target_language_code='zh-cn', source_sub='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4/en.srt', target_sub='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4/zh-cn.srt', source_wav='D:/Program Files/win-pyvideotrans-v3.96/tmp/12268/140f727615/en.wav', source_wav_output='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4/en.m4a', target_wav='D:/Program Files/win-pyvideotrans-v3.96/tmp/12268/140f727615/target.wav', target_wav_output='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4/zh-cn.m4a', subtitles='', novoice_mp4='D:/Program Files/win-pyvideotrans-v3.96/tmp/12268/140f727615/novoice.mp4', noextname='Lustful Libertines – Mommy asked me to pee in her pussy', shibie_audio=None, targetdir_mp4='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4/Lustful Libertines – Mommy asked me to pee in her pussy.mp4', instrument=None, vocal=None, back_audio='', background_music=None, app_mode='tiqu', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', copysrt_rawvideo=False, clear_cache=False, translate_type=2, tts_type=0, recogn_type=1, model_name='large-v3-turbo', voice_autorate=False, video_autorate=False, cuda=True, name='E:/DownLoads/DCL/Lustful Libertines – Mommy asked me to pee in her pussy.mp4', basename='Lustful Libertines – Mommy asked me to pee in her pussy.mp4', ext='mp4', dirname='E:/DownLoads/DCL', shound_del_name=None, uuid='140f727615', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=0, only_out_mp4=False, fix_punc=False, recogn2pass=True)


=
system:Windows-10-10.0.26100-SP0
version:v3.96
frozen:True
language:zh
root_dir:D:/Program Files/win-pyvideotrans-v3.96

1 Replies

这是由于本地 openai-whisper 模型在 GPU 推理时出现了数值溢出(NaN)错误,通常与模型文件损坏或 GPU 驱动/环境问题有关。

解决方案:

  1. 清理并重新下载模型:删除 models/ 目录下与 openai-whisper 相关的模型文件夹(例如 models--openai--whisper-large-v3models--openai--whisper-large-v3-turbo)。重启软件,让其重新下载模型。
  2. 切换识别渠道:在“语音识别渠道”中,暂时改用 faster-whisper(本地) 渠道,其稳定性通常更好。
  3. 检查 GPU 环境:确认 CUDA 和显卡驱动已正确安装。在 CMD 中运行 nvcc -Vnvidia-smi 检查版本和状态。
  4. 降级模型:如果问题持续,在 openai-whisper 设置中尝试使用较小的模型(如 large-v2 而非 large-v3-turbo)。
  5. 使用 CPU 模式:作为临时测试,在“高级选项”中关闭“启用 CUDA 加速”,强制使用 CPU 进行识别,以排除 GPU 相关问题。

注意:你的软件安装路径 D:/Program Files/win-pyvideotrans-v3.96 包含空格,这可能导致一些未知问题。建议将软件移动到无空格路径(如 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