#7586 {"message":"tts failed","Exception":"[ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Slice n

183.23**6 Posted at: 1 hour ago

{"message":"tts failed","Exception":"[ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Slice node. Name:'Slice_12' Status Message: CUDA error cudaErrorNoKernelImageForDevice:no kernel image is available for execution on the device"}
self.api_url='http://127.0.0.1:9880/tts':
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'role': 'ibmTest1.wav', 'filename': 'D:/win-pyvideotrans-v4.13-1/tmp/13732/1790216206.287645-gptsovits.wav', 'tts_type': 13}
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 118, in run
File "videotrans\tts\_base.py", line 122, in run
videotrans.configure.excepts.DubbingSrtError: {"message":"tts failed","Exception":"[ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Slice node. Name:'Slice_12' Status Message: CUDA error cudaErrorNoKernelImageForDevice:no kernel image is available for execution on the device"}
self.api_url='http://127.0.0.1:9880/tts'


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

11 Replies

#1 DeepSeek reply at 1 hour ago

This error originates from your GPT-SoVITS local service (port 9880), not from pyVideoTrans itself.

The key message is:

CUDA error cudaErrorNoKernelImageForDevice: no kernel image is available for execution on the device (occurring in an ONNXRuntime Slice node)

This means the ONNX Runtime inside your GPT-SoVITS deployment was built for a CUDA/GPU architecture that does not match your actual GPU — so no compiled kernel exists to run on it.

It is a GPT-SoVITS environment / GPU compatibility problem, unrelated to pyVideoTrans settings.

Solutions:

  1. Run GPT-SoVITS entirely on CPU — the simplest fix.

    Check whether GPT-SoVITS has a CPU-only launch option, or uninstall the GPU version of ONNX Runtime and install the CPU version inside the GPT-SoVITS environment.

    • In the GPT-SoVITS Python environment: pip uninstall onnxruntime-gpu then pip install onnxruntime
  2. Verify GPU support — run nvidia-smi to confirm your GPU model and driver.

    If your GPU is very old (or the ONNX Runtime build targets a newer compute capability than your card supports), the GPU path simply will not work; use CPU mode.
  3. If you need GPU acceleration, reinstall a matching ONNX Runtime GPU build compatible with your CUDA version and GPU compute capability inside the GPT-SoVITS environment.
  4. After fixing GPT-SoVITS, re-test on its WebUI directly (http://127.0.0.1:9880) before retrying in pyVideoTrans.

The GPT-SoVITS reference audio must be placed in the GPT-SoVITS program's own root directory (not pyVideoTrans's f5-tts folder).

Also confirm you started api.py (not the 7860 WebUI) and that API/api_v2 checkbox matches your launch.

If, after switching GPT-SoVITS to CPU mode, pyVideoTrans still fails, provide the latest log from pyVideoTrans's logs/ folder.

Refer to related docs:

#2 183.23**6 reply at 1 hour ago

how to run govits on cpu

#3 DeepSeek reply at 1 hour ago

The error is coming from your GPT-SoVITS service, and it fails because its ONNX Runtime expects a GPU kernel your card doesn't provide.

Running GPT-SoVITS on CPU solves it.

Steps:

  1. Open a terminal in your GPT-SoVITS folder.
  2. Activate the GPT-SoVITS Python environment (the one you used to install its dependencies), e.g.:

    conda activate <your_gptsovits_env>
  3. Remove the GPU build of ONNX Runtime and install the CPU build:

    pip uninstall onnxruntime-gpu
    pip install onnxruntime
  4. If GPT-SoVITS uses PyTorch with CUDA, force CPU as well — reinstall the CPU wheel of torch in that environment:

    pip uninstall torch torchaudio
    pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu
  5. Start the API service in CPU mode (GPT-SoVITS api.py usually auto-selects device; if it has a device flag, set it to cpu, e.g.

    --device cpu).

    Since the WebUI is Gradio, you can also set the device dropdown to CPU if present.
  6. Verify by calling the service directly at http://127.0.0.1:9880/tts — confirm it returns audio without the CUDA error.
  7. Then retry in pyVideoTrans.

Notes:

  • Place the reference audio (e.g.

    ibmTest1.wav) in the GPT-SoVITS program's root directory, not pyVideoTrans's f5-tts folder.
  • Confirm you launched api.py (port 9880), not the 7860 WebUI, and that the "api_v2" checkbox in pyVideoTrans matches your launch.
  • CPU inference will be slower, but it is stable.

请查阅相关文档:

#4 183.23**6 reply at 1 hour ago

i don't know where to run the command, i never installed dependency

#5 DeepSeek reply at 1 hour ago

"never installed dependency" means you are not running GPT-SoVITS yourself — you are calling a service at http://127.0.0.1:9880 that someone/something else set up on your machine. The CUDA error comes from that service, so you must fix it in THAT program, not in pyVideoTrans.

First, find out what is actually running on port 9880:

  1. Open Command Prompt (press Win+R, type cmd, Enter).
  2. Run:

    netstat -ano | findstr :9880

    Note the PID (last column).

  3. Find the program for that PID:

    tasklist | findstr <PID>

    or open Task Manager → Details tab → find the matching PID → right-click → "Open file location". That folder is where GPT-SoVITS (or whatever TTS runs on 9880) is installed.

Once you know the folder, that is where you run the commands. To run commands there:

  • Open that folder in File Explorer.
  • If it contains a "启动.bat" / "start.bat" / "api.bat" / "run.bat" file — double-click it to launch the service. Some of these scripts have a "CPU" variant; use the CPU one.

To run the pip commands, you need the environment that GPT-SoVITS uses. Look inside that folder for:

  • A python.exe (e.g. in a subfolder like runtime\, python\, or .venv\Scripts\)
  • Or an env / venv / conda folder

Then open that folder in a terminal (in File Explorer's address bar type cmd and Enter), and run:

.\python.exe -m pip uninstall onnxruntime-gpu
.\python.exe -m pip install onnxruntime

(replace .\python.exe with the actual path to the python.exe you found)

Important points:

  • Do NOT run these pip commands in pyVideoTrans's folder — it will not fix the 9880 service.
  • If you did not install GPT-SoVITS yourself and cannot find its folder, then something on your PC is serving port 9880. Check Task Manager / Startup apps for anything related to "GPT-SoVITS", "SoVITS", or "TTS".
  • If you cannot locate or configure it, simply switch pyVideoTrans's TTS channel away from GPT-SoVITS to a built-in/free one (Edge-TTS) and it will work immediately.

Alternative if GPT-SoVITS folder is found but you want the easiest route: many GPT-SoVITS releases ship a dedicated "CPU" start script (e.g. 启动-CPU.bat / go-webui-cpu.bat). Use that instead of the GPU script — no manual pip needed.

If you tell me the contents (file names) of the folder you found, I can tell you exactly which file to run.

请查阅相关文档:
GPT-SoVITS setup

#6 183.23**6 reply at 1 hour ago

command prompt returns: C:\Users\Asus>tasklist | findstr 2364
python.exe 2364 Console 1

#7 DeepSeek reply at 1 hour ago

The PID 2364 is python.exe. Now find its exact location to know which GPT-SoVITS folder it belongs to.Run this in Command Prompt:wmic process where processid=2364 get ExecutablePath,CommandLineThis prints the full path of python.exe and the command line that started it (which usually points to api.py or webui.py inside the GPT-SoVITS folder). That folder is where you must fix the environment.Also run:wmic process where processid=2364 get CommandLineThe CommandLine tells you exactly which script is running (e.g. ...\GPT-SoVITS\api.py).Next steps once you have the folder:1. Open a Command Prompt and cd into that folder (or open the folder in File Explorer, type cmd in the address bar, Enter).2. Run the commands using the SAME python that PID 2364 uses (use the full path from the wmic output, quoted):"<full path from wmic>" -m pip uninstall onnxruntime-gpu -y
"<full path from wmic>" -m pip install onnxruntime3. Stop the running service: in Command Prompt run taskkill /PID 2364 /F4. Restart GPT-SoVITS using its CPU launch script (look for a file like 启动-CPU.bat, api-cpu.bat, or go-webui-cpu.bat in that folder).5. Verify the service responds at http://127.0.0.1:9880, then retry in pyVideoTrans.Important: The wmic output shows several different PIDs for python.exe (2364, plus others like 7980, 5132, etc.). Some of these may be unrelated to GPT-SoVITS. Match the one whose CommandLine references the GPT-SoVITS folder/api.py before touching it.If you prefer to avoid all this: in pyVideoTrans simply change the TTS channel from GPT-SoVITS to Edge-TTS (free, built-in) and it will work immediately with no GPU/ONNX issues.Paste the output of the wmic command here and I can tell you exactly which folder and which python to use.请查阅相关文档:GPT-SoVITS setup

#8 113.80**9 reply at 1 hour ago

D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime>pip uninstall onnxruntime-gpu
'pip' is not recognized as an internal or external command,
operable program or batch file.

#9 DeepSeek reply at 1 hour ago

pip is not on your PATH, so you must use the runtime's python.exe directly.

Steps:

  1. In the Runtime folder, find the full path to python.exe. It should be:
    D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\python.exe
    (look inside that runtime folder for python.exe; it may also be at runtime\python.exe or under a subfolder)
  2. At the same Command Prompt (you are already in D:...\runtime), run:

python.exe -m pip uninstall onnxruntime-gpu -y

then

python.exe -m pip install onnxruntime

If python.exe is not directly in runtime\, search for it:
dir /s /b python.exe
and use the full path, e.g.:
"D:...\runtime\python.exe" -m pip uninstall onnxruntime-gpu -y

  1. Also force the CPU version of torch if it was the GPU build (optional but recommended):
    python.exe -m pip uninstall torch torchaudio -y
    python.exe -m pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu
  2. Stop the currently running service (PID 2364):
    taskkill /PID 2364 /F
  3. Restart GPT-SoVITS on CPU. In the GPT-SoVITS root folder (the one containing api.py, likely D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604), use the CPU launch script — look for a file named like:
    启动-CPU.bat, api-cpu.bat, go-webui-cpu.bat, or similar (a "CPU" version of the start script).
  4. Verify at http://127.0.0.1:9880, then retry in pyVideoTrans.

Note: Running pyVideoTrans operations and heavy CPU TTS at the same time may be slow, but it will work.

If the runtime folder has no python.exe, paste the result of:
dir /s /b python.exe
run from D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\

请查阅相关文档:

#10 113.80**9 reply at 1 hour ago

D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime>python.exe -m pip uninstall onnxruntime-gpu -y
Found existing installation: onnxruntime-gpu 1.19.2
Uninstalling onnxruntime-gpu-1.19.2:
Successfully uninstalled onnxruntime-gpu-1.19.2
ERROR: Exception:
Traceback (most recent call last):
File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_internal\cli\base_command.py", line 169, in exc_logging_wrapper

status = run_func(*args)

File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_internal\commands\uninstall.py", line 110, in run

uninstall_pathset.commit()

File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_internal\req\req_uninstall.py", line 432, in commit

self._moved_paths.commit()

File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_internal\req\req_uninstall.py", line 278, in commit

save_dir.cleanup()

File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_internal\utils\temp_dir.py", line 173, in cleanup

rmtree(self._path)

File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 291, in wrapped_f

return self(f, *args, **kw)

File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 381, in call

do = self.iter(retry_state=retry_state)

File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 327, in iter

raise retry_exc.reraise()

File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 160, in reraise

raise self.last_attempt.result()

File "concurrent\futures\_base.py", line 439, in result
File "concurrent\futures\_base.py", line 391, in __get_result
File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 384, in call

result = fn(*args, **kwargs)

File "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\lib\site-packages\pip\_internal\utils\misc.py", line 130, in rmtree

shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler)

File "shutil.py", line 759, in rmtree
File "shutil.py", line 624, in _rmtree_unsafe
File "shutil.py", line 629, in _rmtree_unsafe
File "shutil.py", line 627, in _rmtree_unsafe
PermissionError: [WinError 5] Access is denied: 'D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\Lib\site-packages\~nnxruntime\capi\onnxruntime_providers_cuda.dll'

#11 DeepSeek reply at 1 hour ago

The uninstall mostly succeeded — it removed the onnxruntime-gpu 1.19.2 package, but failed only at the very end because a leftover file (~nnxruntime\capi\onnxruntime_providers_cuda.dll, marked with a ~ prefix for deletion) is still locked/in use.

This is a permission/lock error during cleanup, not a functional failure.Solutions:Open Command Prompt as Administrator (right-click Command Prompt → Run as administrator), then cd into the runtime folder and retry:cd /d D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtimepython.exe -m pip uninstall onnxruntime-gpu -yIf it still complains, the file is locked by the running service.

Kill it first:taskkill /PID 2364 /FThen delete the leftover folder manually.

Note the literal folder name starts with a tilde:deltree "D:\GPT-SoVITS-v2pro-20250604\GPT-SoVITS-v2pro-20250604\runtime\Lib\site-packages\~nnxruntime"Then continue:python.exe -m pip install onnxruntimeIf deltree fails with access denied, run the same commands from an Administrator Command Prompt, or delete the ~nnxruntime folder manually in File Explorer (close all GPT-SoVITS windows first).After onnxruntime (CPU build) is installed, restart GPT-SoVITS with its CPU launch script, verify at

http://127.0.0.1:9880, then retry in pyVideoTrans.Notes:You have already removed onnxruntime-gpu; you just need to finish cleanup and install onnxruntime (CPU).

If GPT-SoVITS also uses a GPU torch build, run the torch CPU reinstall step too (from the previous message).Literal folder names starting with ~ are common on Windows when pip moves files to a temp name during uninstall — deleting them manually is safe.请查阅相关文档:
GPT-SoVITS setup

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