#2254 运行F5-TTS遇到以下错误

2408:8214* Posted at: 1 day ago 👁18

Active code page: 65001
Traceback (most recent call last):
File "E:\F5TTS\runtime\Lib\site-packages\torchaudio\_internal\__init__.py", line 2, in

from .fb import download_url_to_file, load_state_dict_from_url

ModuleNotFoundError: No module named 'torchaudio._internal.fb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\F5TTS\src\f5_tts\infer\infer_gradio.py", line 13, in

import torchaudio

File "E:\F5TTS\runtime\Lib\site-packages\torchaudio\__init__.py", line 2, in

from . import _extension  # noqa  # usort: skip

File "E:\F5TTS\runtime\Lib\site-packages\torchaudio\_extension\__init__.py", line 5, in

from torchaudio._internal.module_utils import fail_with_message, is_module_available, no_op

File "E:\F5TTS\runtime\Lib\site-packages\torchaudio\_internal\__init__.py", line 4, in

from torch.hub import download_url_to_file, load_state_dict_from_url

File "E:\F5TTS\runtime\Lib\site-packages\torch\__init__.py", line 148, in

raise err

OSError: [WinError 126] 找不到指定的模块。 Error loading "E:\F5TTS\runtime\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.
Press any key to continue . . .

1 Replies

这个错误表明您的 F5-TTS 整合包环境中的 PyTorch 库存在问题,具体是 fbgemm.dll 文件缺失或损坏,导致 torchaudio 无法正常加载。

请按以下步骤尝试解决:

  1. 重新安装 PyTorch (推荐)

    • 打开命令提示符 (CMD) 或 PowerShell。
    • 激活您的 F5-TTS 虚拟环境(如果整合包提供了 venvconda 环境,请先运行对应的激活脚本,例如 .\venv\Scripts\activate)。
    • 运行以下命令重新安装与您 CUDA 版本匹配的 PyTorch 和 torchaudio:

      pip uninstall torch torchaudio torchvision -y
      pip install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu118
      • 注意:如果您的 CUDA 版本是 12.x,请将上述命令中的 cu118 改为 cu121cu122
  2. 检查并修复依赖项

    • 在激活的虚拟环境中,运行以下命令确保其他关键依赖已安装:

      pip install numpy soundfile gradio
  3. 使用整合包自带的修复工具

    • 检查 F5-TTS 整合包目录下是否有 修复环境.bat重新安装依赖.bat 或类似名称的脚本,运行它。
  4. 终极方案:重新下载整合包

    • 如果以上步骤均无效,可能是整合包本身不完整或与您的系统不兼容。建议从原始发布地址(如作者的 GitHub 或网盘)重新下载完整的 F5-TTS Windows 整合包,并确保在解压时关闭杀毒软件,以防 DLL 文件被误删。

如果问题依旧,请提供您下载 F5-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