#855 111gradio_client.exceptions.AppError: The upstream Gradio app has raised an exception: torch.cat(): expected a non-empty

*6ea0:d32f* Posted at: 2 hours ago 👁6

配音阶段出错:无效的值或参数: The upstream Gradio app has raised an exception: torch.cat(): expected a non-empty list of Tensors[F5/Index/Spark/Dia TTS]:

Traceback (most recent call last):

File "videotrans\tts\_f5tts.py", line 286, in _item_task

File "tenacity\__init__.py", line 338, in wrapped_f

File "tenacity\__init__.py", line 477, in __call__

File "tenacity\__init__.py", line 378, in iter

File "tenacity\__init__.py", line 421, in exc_check

tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

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

File "videotrans\task\trans_create.py", line 487, in dubbing

File "videotrans\task\trans_create.py", line 745, in _tts

File "videotrans\tts\__init__.py", line 501, in run

File "videotrans\tts\_base.py", line 128, in run

File "videotrans\tts\_f5tts.py", line 41, in _exec

File "videotrans\tts\_base.py", line 189, in _local_mul_thread

File "videotrans\tts\_base.py", line 189, in

File "concurrent\futures\_base.py", line 446, in result

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

File "concurrent\futures\thread.py", line 58, in run

File "videotrans\tts\_f5tts.py", line 288, in _item_task

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

File "videotrans\tts\_f5tts.py", line 276, in _run

File "videotrans\tts\_f5tts.py", line 179, in _item_task_index

File "gradio_client\client.py", line 478, in predict

).result()

File "gradio_client\client.py", line 1539, in result

return super().result(timeout=timeout)

File "concurrent\futures\_base.py", line 446, in result

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

File "concurrent\futures\thread.py", line 58, in run

File "gradio_client\client.py", line 1158, in _inner

predictions = _predict(*data)

File "gradio_client\client.py", line 1275, in _predict

raise AppError(

gradio_client.exceptions.AppError: The upstream Gradio app has raised an exception: torch.cat(): expected a non-empty list of Tensors

=====

Windows-10-10.0.26100-SP0

version:v3.80

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
这个问题是由于在使用 F5/Index/Spark/Dia TTS 等本地语音合成服务时,后端 Gradio 应用在处理音频张量时出现了异常。具体错误是 torch.cat(): expected a non-empty list of Tensors,表明后端服务在处理音频数据时接收到了空张量列表。

主要原因分析:

1. 本地 TTS 服务(如 F5-TTS、Index-TTS 等)未正确启动或配置

2. 网络连接问题导致无法与本地 Gradio 服务通信

3. 音频数据格式或内容问题导致后端处理失败

解决方案:

1. 检查本地 TTS 服务状态

  • 确保你已经按照文档要求正确部署并启动了对应的本地 TTS 服务
  • 验证服务地址(通常是 http://127.0.0.1:7860/)在浏览器中能够正常访问

2. 重新启动本地 TTS 服务

  • 如果服务已启动,尝试重启服务
  • 检查服务日志,确认没有其他错误

3. 验证 TTS 设置

  • 在 pyVideoTrans 的 "TTS设置" 菜单中,确认你填写的 API 地址正确无误
  • 确保地址格式为完整的 URL,如 http://127.0.0.1:7860/

4. 检查网络连接

  • 确保防火墙没有阻止 pyVideoTrans 与本地服务的通信
  • 可以尝试在浏览器中访问你设置的 TTS 服务地址来验证服务是否正常

5. 尝试其他配音渠道

  • 如果问题持续存在,可以暂时切换到其他配音渠道,如 edge-TTS 或 Azure TTS
  • 等本地 TTS 服务问题解决后再切换回来

如果以上方法都无法解决问题,请提供更多关于你本地 TTS 服务部署的详细信息,包括服务类型、部署方式和服务日志,以便进一步诊断。

Post Your Reply
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.

Donate: https://ko-fi.com/jianchang512

Trending Questions