#8681 Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=16384, prompt_token

2407**150 Posted at: 38 minutes ago

Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=16384, prompt_tokens=14888, total_tokens=17872, completion

1 Replies

#1 DeepSeek reply at 38 minutes ago

这是 AI 翻译渠道返回内容超出最大输出长度(max tokens)导致的:模型还没输出完译文就被强制截断,因此无法解析出合法的字幕内容。常见两个原因,请按顺序排查:

原因一:单次发送的字幕行数过多,超出模型输出上限

  1. 打开 菜单 → 工具/选项 → 高级选项 → 字幕翻译;
  2. 将 AI翻译渠道每批字幕行数 调小,改为 10 或 20;
  3. 或在所用 AI 渠道的设置窗口里,把 最大输出token(max_tokens) 调大;
  4. 若同时勾选了 AI翻译附带所有字幕做参考,该选项会让 token 消耗倍增,可先取消勾选再试。

原因二:原始字幕中存在大量重复文字,导致模型陷入死循环

  • 典型表现是某几条字幕里出现连续几十个重复的词(如 no, no, no...、hey, hey, hey...),模型会一直重复直到耗尽 token;
  • 处理方法:用文本编辑器打开原始字幕文件(位于输出目录 _video_out/视频名-格式/ 下的源语言 srt,或在软件右侧字幕预览区找到对应行),删掉这些大量重复的内容后再重新翻译。

其他辅助排查

  • 若你使用的是本地部署的小参数模型(7B 级),指令跟随能力弱,更容易超长输出或输出无关文本,建议换用 DeepSeek / OpenAI 等在线旗舰模型;
  • 修改提示词或换渠道后若结果无变化,可能是命中了翻译缓存,需要勾选主界面的 清理已生成,或删除 tmp/translate_cache/ 目录后再试。

请查阅相关文档:

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