#8383 Error during subtitle translation stage [Local LLM (OpenAI-compatible)] lending the prompt path its slots failed: prefil

188.192**8 Posted at: 56 minutes ago

Error during subtitle translation stage [Local LLM (OpenAI-compatible)] lending the prompt path its slots failed: prefill: relayout: the stream failed
http://127.0.0.1:8080/v1
{'model': 'iq3_s', 'timeout': 300, 'temperature': 0.2, 'max_tokens': 8192, 'reasoning_effort': 'none'}
None
Traceback (most recent call last):

File "videotrans\translator\_openaicompat.py", line 90, in _item_task

File "videotrans\translator\_openaicompat.py", line 40, in _create_completion

File "openai\_utils\_utils.py", line 298, in wrapper

File "openai\resources\chat\completions\completions.py", line 1215, in create

File "openai\_base_client.py", line 1332, in post

File "openai\_base_client.py", line 1105, in request

openai.BadRequestError: Error code: 400 - {'error': {'type': 'invalid_request_error', 'message': 'lending the prompt path its slots failed: prefill: relayout: the stream failed'}}

The above exception was the direct cause of the following exception:

Tra
......
utures\_base.py", line 451, in result

File "concurrent\futures\_base.py", line 403, in __get_result

File "tenacity\__init__.py", line 480, in call

File "videotrans\translator\_openaicompat.py", line 101, in _item_task

videotrans.configure.excepts.StopTask: lending the prompt path its slots failed: prefill: relayout: the stream failed
http://127.0.0.1:8080/v1
{'model': 'iq3_s', 'timeout': 300, 'temperature': 0.2, 'max_tokens': 8192, 'reasoning_effort': 'none'}
None
trk=[TransCreate]: uuid='0e2d259637', proxy_str=None, cfg=[TaskCfgVTT]当前工作模式: 翻译视频 批量翻译模式 每批1个
原始输入文件名: C:/Private Filez/Videoz/Zum Übertragen/Dubbing/Dubprogress/2020-03-26_Leah Remini_129K views · 3.3K reactions -For laughs-_Throwback to Cheryl Burke, Shannon Farrara and I _trying to give my mom a “signature move” #tbt Leah Remini_2623133207923359.mp4,
输出结果保存到文件夹: C:/Private Filez/Videoz/Zum Übertragen/Dubbing/Dubprogress/2020-03-26_Leah Remini_129K views · 3.3K reactions -For laughs-_Throwback to Cheryl Burke, Shannon Farrara and I _trying to give my mom a “signature move” #tbt Leah Remini_2623133207923359-mp4,
临时文件夹: C:/vTrans/tmp/45600/0e2d259637
未选 清理已存在
已启用CUDA加速
已选 降噪
已选 识别说话人,最大说话人数量不限制
STT Service:openai-whisper(Built-in), large-v3-turbo, 发音语言: English,
TranslateSrt:Local LLM (OpenAI-compatible),原始语言:English,目标语言:German, 未选 SendSRT
TTS Service:F5-TTS(Built-in), 角色:clone, 配音语言:German, 未选 二次语音识别
音量:-1%, 语速:+0%, 已选 音频加速, 未选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: Hard Subtitles
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件, precent=12, hasend=False, should_recogn=True, should_trans=True, should_dubbing=True, should_hebing=True, is_copy_video=False, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='C:/vTrans/tmp/45600/0e2d259637/vocal.wav', should_recogn2=False, do_diarize=False


=
system:Windows-10-10.0.26300-SP0
version:v4.16
frozen:True
language:en_US
root_dir:C:/vTrans

1 Replies

#1 DeepSeek reply at 56 minutes ago

This error does not come from pyVideoTrans itself — it is a 400 Bad Request returned by your local inference server at http://127.0.0.1:8080/v1. The message lending the prompt path its slots failed: prefill: relayout: the stream failed is generated inside the local LLM backend during the prefill / KV-cache allocation step, which in practice almost always means one of: the request (prompt + max_tokens) exceeds the server's context window, the backend cannot allocate KV-cache memory, or the loaded model/quant is unstable in the current backend configuration. pyVideoTrans only forwards the translation prompt and aborts because the server refused the request (openai.BadRequestError → StopTask).

Fixes (in order of likelihood)

  1. Shrink the request size on the pyVideoTrans side

    • Menu → Tools → Advanced Options → Subtitle Translation (字幕翻译)
    • Set Batch size (lines) for AI translation to 1–5 (currently your prompt is likely too long).
    • Keep SendSRT (发送完整字幕) unchecked (already unchecked — keep it).
    • Lower the channel's max_tokens from 8192 to 1024–2048. If max_tokens + prompt length > the server's --ctx-size, prefill will fail exactly like this.
  2. Raise the server's context/memory limits and restart the LLM service

    • Start the local server with a context large enough for prompt + output, e.g. -c 8192 (or 16384), and a modest -b/-ub batch size (e.g. -ub 256).
    • If the model is partly GPU-offloaded (-ngl), reduce -ngl or free VRAM; a failed KV-cache relayout is frequently an out-of-memory condition rather than a logic error.
    • Restart the server process (stale slots from a previous crashed request will keep failing until restart).
  3. Backend/quant-specific (ik_llama.cpp-style iq3_s builds)

    • relayout: the stream failed is a KV-cache layout failure; try disabling flash-attention (-fa off) and/or MOE offload options, or switch to the upstream llama.cpp server binary.
    • If it persists, test a different quant (e.g. Q4_K_M) or a smaller model — some IQ-quants fail prefill on certain backends.
  4. Verify independently of pyVideoTrans — send a minimal request with curl to http://127.0.0.1:8080/v1/chat/completions with a short prompt. If that also returns 400, the fault is confirmed to be the LLM service, not the software.
  5. Workaround to unblock the job now — temporarily switch the translation channel to DeepSeek / another AI channel, or to M2M100 (built-in) / Google, to complete this video while you fix the local server.

If the above does not resolve it, send the local LLM server's own console log (the lines printed at the moment of the 400), plus logs/ in the software directory.

请查阅相关文档:

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