#7618 Error during speech recognition stage[faster-whisper(Built-in)] parallel_for failed: cudaErrorInvalidDevice: invalid dev

203.175**3 Posted at: 57 minutes ago

Error during speech recognition stage[faster-whisper(Built-in)] parallel_for failed: cudaErrorInvalidDevice: invalid device ordinal:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 108, in faster_whisper
File "faster_whisper\transcribe.py", line 942, in transcribe
File "faster_whisper\transcribe.py", line 1819, in detect_language
File "faster_whisper\transcribe.py", line 1400, in encode
RuntimeError: parallel_for failed: cudaErrorInvalidDevice: invalid device ordinal

Traceback (most recent call last):

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

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

File "videotrans\task\speech2text.py", line 100, in recogn

File "videotrans\recognition\__init__.py", line 121, in run

File "videotrans\recognition\_base.py", line 99, in run

File "videotrans\recognition\_whisper.py", line 41, in _exec

File "videotrans\recognition\_whisper.py", line 138, in _faster

File "videotrans\configure\base.py", line 264, in _new_process

videotrans.configure.excepts.VideoTransError: parallel_for failed: cudaErrorInvalidDevice: invalid device ordinal:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 108, in faster_whisper
File "faster_whisper\transcribe.py", line 942, in transcribe
File "faster_whisper\transcribe.py", line 1819, in detect_language
File "faster_whisper\transcribe.py", line 1400, in encode
RuntimeError: parallel_for failed: cudaErrorInvalidDevice: invalid device ordinal
[SpeechToText]语音转录: self.out_format='srt',self.copysrt_rawvideo=False,self.spk_insert=True
[TaskCfgSTT]
原始输入文件名: D:/AI Agents Aren't the Revolution. They're the Catalyst! - IBM Technology (1080p).mp4,
输出结果保存到文件夹: D:/win-pyvideotrans-v4.13-1/output/recogn,
临时文件夹: D:/win-pyvideotrans-v4.13-1/tmp/8492/b87d5041b5
已启用CUDA加速
未选 降噪
STT Service:faster-whisper(Built-in), tiny 断句方式:默认断句
发音语言:自动检测
未选 降噪
代理地址:http://127.0.0.1:7890


=
system:Windows-10-10.0.19045-SP0
version:v4.13
frozen:True
language:en_US
root_dir:D:/win-pyvideotrans-v4.13-1

1 Replies

#1 DeepSeek reply at 56 minutes ago

The core issue is that you enabled "CUDA acceleration" but the CUDA runtime cannot find/access the GPU device you are pointing it to — hence cudaErrorInvalidDevice: invalid device ordinal.

This is a GPU/CUDA environment mismatch, not a model problem.

Common causes and fixes:

  1. GPU is not actually CUDA-capable or driver is outdated

    • CUDA acceleration only works on NVIDIA (N卡).

      AMD/Intel GPUs are not supported.
    • Update your NVIDIA driver to the latest version.

      CUDA 12.8 requires a recent driver.
  2. CUDA Toolkit / cuDNN mismatch or missing

    • Required: CUDA Toolkit 12.8+ and cuDNN 9.11+.
    • Verify in CMD:

      • nvcc -V (CUDA compiler version)
      • nvidia-smi (driver + max supported CUDA)
    • Ensure the CUDA bin and lib directories are correctly added to the system Path.
  3. Multiple GPUs / device ordinals

    • If your machine has integrated + discrete GPU (or multiple GPUs), the software may be trying to use a device index that doesn't exist or is invalid.
    • Update to a recent build (v3.98-317+) which auto-selects the GPU with the most available VRAM.
  4. Quick fallback while troubleshooting

    • Uncheck 启用CUDA加速 (Enable CUDA acceleration) on the main interface and retry.

      It will run on CPU (slower, but functional).
    • Note: faster-whisper only uses GPU when CUDA is enabled.
  5. Make sure the dedicated NVIDIA GPU is the active one

    • In Windows: Settings → System → Display → Graphics settings, set sp.exe to use the High-performance NVIDIA processor (for laptops with dual GPU).

If none of the above resolves it, please provide:

  • Output of nvcc -V and nvidia-smi
  • Your GPU model
  • Latest log file from the logs/ folder (last ~30 lines)

请查阅相关文档:

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