#6948 parallel_for failed: cudaErrorInvalidDevice: invalid device ordinal:Traceback (most recent call last): File

79.115**2 Posted at: 1 hour ago

parallel_for failed: cudaErrorInvalidDevice: invalid device ordinal:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 184, in faster_whisper
File "faster_whisper\transcribe.py", line 1851, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1190, in generate_segments
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\only_one.py", line 70, in run
File "videotrans\task\_stage_recogn.py", line 63, in recogn
File "videotrans\recognition\__init__.py", line 211, in run
File "videotrans\recognition\_base.py", line 98, in run
File "videotrans\recognition\_whisper.py", line 41, in _exec
File "videotrans\recognition\_whisper.py", line 130, in _faster
File "videotrans\configure\base.py", line 270, 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 184, in faster_whisper
File "faster_whisper\transcribe.py", line 1851, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1190, in generate_segments
File "faster_whisper\transcribe.py", line 1400, in encode
RuntimeError: parallel_for failed: cudaErrorInvalidDevice: invalid device ordinal

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/CRISTI/Documents/videoplayback.mp4,
输出结果保存到文件夹: C:/Users/CRISTI/Documents/_video_out/videoplayback-mp4,
临时文件夹: E:/New folder (2)/tmp/13588/bcbae7afcb
已选 清理已存在
已启用CUDA加速
未选 降噪
STT Service:faster-whisper(Built-in), large-v3-turbo, 发音语言: Romanian, 断句方式:默认断句
发音语言和目标语言相同,不翻译字幕
未选 配音角色,不进行配音
字幕: Hard Subtitles


=
system:Windows-10-10.0.19045-SP0
version:v4.11
frozen:True
language:en
root_dir:E:/New folder (2)

1 Replies

#1 DeepSeek reply at 1 hour ago

This is a CUDA device detection error (cudaErrorInvalidDevice: invalid device ordinal). The CUDA runtime is trying to use a GPU device index that is not available or not properly exposed to the system. This usually means your CUDA Toolkit/cuDNN installation or the GPU driver is not correctly configured.

Steps to fix (in order):

  1. Verify GPU driver: Open Command Prompt (CMD) and run:

    nvidia-smi

    If this fails or shows no GPU, your NVIDIA driver is missing or broken. Download and install the latest driver from NVIDIA.com, then reboot.

  2. Verify CUDA Toolkit: Run:

    nvcc -V

    It must report version 12.8 or higher. If nvcc is not found, CUDA Toolkit is not installed or not on PATH.

  3. Verify cuDNN: You need cuDNN 9.11+. Make sure the bin and lib directories of both CUDA and cuDNN are added to your system Path environment variable. Then restart the PC.
  4. Check environment variable: Ensure CUDA_PATH is set correctly to your CUDA installation root (e.g., C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8).
  5. Overwrite the complete package: If you are using the pre-packaged Windows version, re-download the full package (2.7GB) from https://pyvideotrans.com/downpackage, overwrite your current installation, and re-test. A 360MB patch package is insufficient for GPU features.
  6. Temporary workaround: In the main interface, uncheck 启用CUDA加速 (Enable CUDA) and re-run. Translation will be slower but should not crash. Use this to confirm the issue is GPU-related.

If the issue persists after all steps above, please provide the latest log file from logs/ folder and your exact GPU model, driver version, and CUDA version — that will help narrow it down.

请查阅相关文档:

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