[index-tts]使用uvsync安装完成并下载了模型文件,运行uv run webui.py出错

2025-10-28 587 views
1

(index-tts) C:\Users\admin\index-tts>uv run webui.py

>> GPT weights restored from: checkpoints\gpt.pth
[2025-09-09 12:32:49,076] [INFO] [real_accelerator.py:254:get_accelerator] Setting ds_accelerator to cuda (auto detect)
test.c
LINK : fatal error LNK1181: 无法打开输入文件“aio.lib”
test.c
LINK : fatal error LNK1181: 无法打开输入文件“cufile.lib”
W0909 12:33:25.637000 4428 .venv\Lib\site-packages\torch\distributed\elastic\multiprocessing\redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
[2025-09-09 12:33:26,840] [INFO] [logging.py:107:log_dist] [Rank -1] [TorchCheckpointEngine] Initialized with serialization = False
GPT2InferenceModel has generative capabilities, as `prepare_inputs_for_generation` is explicitly overwritten. However, it doesn't directly inherit from `GenerationMixin`. From 👉v4.50👈 onwards, `PreTrainedModel` will NOT inherit from `GenerationMixin`, and this model will lose the ability to call `generate` and other related functions.
  - If you're using `trust_remote_code=True`, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
  - If you are the owner of the model architecture code, please modify your model class such that it inherits from `GenerationMixin` (after `PreTrainedModel`, otherwise you'll get an exception).
  - If you are not the owner of the model architecture class, please contact the model code owner to update it.
[2025-09-09 12:33:26,861] [INFO] [logging.py:107:log_dist] [Rank -1] DeepSpeed info: version=0.17.1+2ce55057, git-hash=2ce55057, git-branch=v0.17.1-branch
[2025-09-09 12:33:26,862] [WARNING] [config_utils.py:70:_process_deprecated_field] Config parameter mp_size is deprecated use tensor_parallel.tp_size instead
[2025-09-09 12:33:26,864] [INFO] [logging.py:107:log_dist] [Rank -1] [TorchCheckpointEngine] Initialized with serialization = False
[2025-09-09 12:33:26,864] [INFO] [logging.py:107:log_dist] [Rank -1] quantize_bits = 8 mlp_extra_grouping = False, quantize_groups = 1
[2025-09-09 12:33:26,990] [INFO] [logging.py:107:log_dist] [Rank -1] DeepSpeed-Inference config: {'layer_id': 0, 'hidden_size': 1280, 'intermediate_size': 5120, 'heads': 20, 'num_hidden_layers': -1, 'dtype': torch.float32, 'pre_layer_norm': True, 'norm_type': <NormType.LayerNorm: 1>, 'local_rank': -1, 'stochastic_mode': False, 'epsilon': 1e-05, 'mp_size': 1, 'scale_attention': True, 'triangular_masking': True, 'local_attention': False, 'window_size': 1, 'rotary_dim': -1, 'rotate_half': False, 'rotate_every_two': True, 'return_tuple': True, 'mlp_after_attn': True, 'mlp_act_func_type': <ActivationFuncType.GELU: 1>, 'training_mp_size': 1, 'bigscience_bloom': False, 'max_out_tokens': 1024, 'min_out_tokens': 1, 'scale_attn_by_inverse_layer_idx': False, 'enable_qkv_quantization': False, 'use_mup': False, 'return_single_tuple': False, 'set_empty_params': False, 'transposed_mode': False, 'use_triton': False, 'triton_autotune': False, 'num_kv': -1, 'rope_theta': 10000, 'invert_mask': True}
W0909 12:33:27.396000 4428 .venv\Lib\site-packages\torch\utils\cpp_extension.py:466] Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
W0909 12:33:27.397000 4428 .venv\Lib\site-packages\torch\utils\cpp_extension.py:2425] TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
W0909 12:33:27.397000 4428 .venv\Lib\site-packages\torch\utils\cpp_extension.py:2425] If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'] to specific architectures.
信息: 用提供的模式无法找到文件。
>> Failed to load custom CUDA kernel for BigVGAN. Falling back to torch.
Traceback (most recent call last):
  File "C:\Users\admin\index-tts\webui.py", line 52, in <module>
    tts = IndexTTS2(model_dir=cmd_args.model_dir, cfg_path=os.path.join(cmd_args.model_dir, "config.yaml"),is_fp16=cmd_args.is_fp16)
  File "C:\Users\admin\index-tts\indextts\infer_v2.py", line 106, in __init__
    self.extract_features = SeamlessM4TFeatureExtractor.from_pretrained("facebook/w2v-bert-2.0")
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\transformers\feature_extraction_utils.py", line 384, in from_pretrained
    feature_extractor_dict, kwargs = cls.get_feature_extractor_dict(pretrained_model_name_or_path, **kwargs)
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\transformers\feature_extraction_utils.py", line 510, in get_feature_extractor_dict
    resolved_feature_extractor_file = cached_file(
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\transformers\utils\hub.py", line 312, in cached_file
    file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\transformers\utils\hub.py", line 557, in cached_files
    raise e
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\transformers\utils\hub.py", line 470, in cached_files
    hf_hub_download(
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\huggingface_hub\file_download.py", line 1010, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\huggingface_hub\file_download.py", line 1073, in _hf_hub_download_to_cache_dir
    (url_to_download, etag, commit_hash, expected_size, xet_file_data, head_call_error) = _get_metadata_or_catch_error(
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\huggingface_hub\file_download.py", line 1546, in _get_metadata_or_catch_error
    metadata = get_hf_file_metadata(
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\huggingface_hub\file_download.py", line 1463, in get_hf_file_metadata
    r = _request_wrapper(
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\huggingface_hub\file_download.py", line 286, in _request_wrapper
    response = _request_wrapper(
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\huggingface_hub\file_download.py", line 309, in _request_wrapper
    response = http_backoff(method=method, url=url, **params, retry_on_exceptions=(), retry_on_status_codes=(429,))
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\huggingface_hub\utils\_http.py", line 310, in http_backoff
    response = session.request(method=method, url=url, **kwargs)
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\requests\sessions.py", line 575, in request
    prep = self.prepare_request(req)
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\requests\sessions.py", line 484, in prepare_request
    p.prepare(
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\requests\models.py", line 367, in prepare
    self.prepare_url(url, params)
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\requests\models.py", line 438, in prepare_url
    raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL '""/facebook/w2v-bert-2.0/resolve/main/preprocessor_config.json': No scheme supplied. Perhaps you meant https://""/facebook/w2v-bert-2.0/resolve/main/preprocessor_config.json?

(index-tts) C:\Users\admin\index-tts>python -c "import torch; print(torch.cuda.is_available(), torch.version.cuda)" True 12.8

回答

1

网络问题,第一次启动要下载其他模型的

2

遇到类似问题,我是安装Deepspeed时失败,同样报错,貌似是Windows下对Deepspeed的支持有些问题。

LINK : fatal error LNK1181: 无法打开输入文件“aio.lib” test.c LINK : fatal error LNK1181: 无法打开输入文件“cufile.lib”

--

1

遇到类似问题,我是安装Deepspeed时失败,同样报错,貌似是Windows下对Deepspeed的支持有些问题。

LINK : fatal error LNK1181: 无法打开输入文件“aio.lib” test.c LINK : fatal error LNK1181: 无法打开输入文件“cufile.lib”

--

用conda安装cudatoolkit好像可以解决

9

cudatoolkit

展开说说?具体要安装哪些玩意儿~

不过即使报这个错误 好像也不影响后续使用

LINK : fatal error LNK1181: 无法打开输入文件“aio.lib” LINK : fatal error LNK1181: 无法打开输入文件“cufile.lib”

1

看到作者更新了readme,重新安装,结果在git clone时就出错:

C:\Users\admin>git clone https://github.com/index-tts/index-tts.git
Cloning into 'index-tts'...
remote: Enumerating objects: 926, done.
remote: Counting objects: 100% (461/461), done.
remote: Compressing objects: 100% (211/211), done.
remote: Total 926 (delta 355), reused 250 (delta 250), pack-reused 465 (from 2)
Receiving objects: 100% (926/926), 33.19 MiB | 1.55 MiB/s, done.
Resolving deltas: 100% (453/453), done.
Updating files: 100% (247/247), done.
Downloading examples/emo_hate.wav (145 KB)
Error downloading object: examples/emo_hate.wav (89e6e7e): Smudge error: Error downloading examples/emo_hate.wav (89e6e7eee1a28303776e9cf43971e9505529bd0e669f5fcf47f4d1370f9187c4): batch response: This repository exceeded its LFS budget. The account responsible for the budget should increase it to restore access.

Errors logged to 'C:\Users\admin\index-tts\.git\lfs\logs\20250910T090151.4691282.log'.
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: examples/emo_hate.wav: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

C:\Users\admin>cd index-tts

C:\Users\admin\index-tts>git lfs pull
Error updating the Git index: (0/1), 0 B | 0 B/s
error: indextts/BigVGAN/__init__.py: cannot add to the index - missing --add option?
fatal: Unable to process path indextts/BigVGAN/__init__.py
6

哦。这真是个不幸的消息。IndexTTS 已经达到了免费 Git-LFS 克隆数量的上限:

下载对象时出错:examples/emo_hate.wav (89e6e7e):污点错误:下载 examples/emo_hate.wav (89e6e7eee1a28303776e9cf43971e9505529bd0e669f5fcf47f4d1370f9187c4) 时出错:批量响应:此存储库超出了其 LFS 预算。负责预算的账户应增加预算以恢复访问权限。

此限制只能通过从 GitHub 购买 Git-LFS 带宽容量来增加。很遗憾,您必须等到问题解决。

编辑:Git-LFS 带宽现已提升。代码库现在可以再次克隆了。祝您使用愉快,并享受 IndexTTS2!❤️

0

我手动下载了文件后,勉强安装成功。但是运行时出错:

C:\Users\admin\index-tts>uv run webui.py
>> GPT weights restored from: ./checkpoints\gpt.pth
[2025-09-10 12:54:55,538] [INFO] [real_accelerator.py:254:get_accelerator] Setting ds_accelerator to cuda (auto detect)
test.c
LINK : fatal error LNK1181: 无法打开输入文件“cufile.lib”
W0910 12:55:15.796000 18624 .venv\Lib\site-packages\torch\distributed\elastic\multiprocessing\redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
[2025-09-10 12:55:17,187] [INFO] [logging.py:107:log_dist] [Rank -1] [TorchCheckpointEngine] Initialized with serialization = False
GPT2InferenceModel has generative capabilities, as `prepare_inputs_for_generation` is explicitly overwritten. However, it doesn't directly inherit from `GenerationMixin`. From 👉v4.50👈 onwards, `PreTrainedModel` will NOT inherit from `GenerationMixin`, and this model will lose the ability to call `generate` and other related functions.
  - If you're using `trust_remote_code=True`, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
  - If you are the owner of the model architecture code, please modify your model class such that it inherits from `GenerationMixin` (after `PreTrainedModel`, otherwise you'll get an exception).
  - If you are not the owner of the model architecture class, please contact the model code owner to update it.
>> semantic_codec weights restored from: C:\Users\admin\.cache\huggingface\hub\models--amphion--MaskGCT\snapshots\265c6cef07625665d0c28d2faafb1415562379dc\semantic_codec\model.safetensors
cfm loaded
length_regulator loaded
gpt_layer loaded
>> s2mel weights restored from: ./checkpoints\s2mel.pth
>> campplus_model weights restored from: C:\Users\admin\.cache\huggingface\hub\models--funasr--campplus\snapshots\fb71fe990cbf6031ae6987a2d76fe64f94377b7e\campplus_cn_common.bin
Loading weights from nvidia/bigvgan_v2_22khz_80band_256x
Removing weight norm...
>> bigvgan weights restored from: nvidia/bigvgan_v2_22khz_80band_256x
>> TextNormalizer loaded
>> bpe model loaded from: ./checkpoints\bpe.model
* Running on local URL:  http://0.0.0.0:7860
Traceback (most recent call last):
  File "C:\Users\admin\index-tts\webui.py", line 350, in <module>
    demo.launch(server_name=cmd_args.host, server_port=cmd_args.port)
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\gradio\blocks.py", line 2843, in launch
    raise Exception(
Exception: Couldn't start the app because 'http://localhost:7860/gradio_api/startup-events' failed (code 503). Check your network or proxy settings to ensure localhost is accessible.
7

我手动下载了文件后,勉强安装成功。但是运行时出错:

C:\Users\admin\index-tts>uv run webui.py

GPT weights restored from: ./checkpoints\gpt.pth [2025-09-10 12:54:55,538] [INFO] [real_accelerator.py:254:get_accelerator] Setting ds_accelerator to cuda (auto detect) test.c LINK : fatal error LNK1181: 无法打开输入文件“cufile.lib” W0910 12:55:15.796000 18624 .venv\Lib\site-packages\torch\distributed\elastic\multiprocessing\redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs. [2025-09-10 12:55:17,187] [INFO] [logging.py:107:log_dist] [Rank -1] [TorchCheckpointEngine] Initialized with serialization = False GPT2InferenceModel has generative capabilities, as prepare_inputs_for_generation is explicitly overwritten. However, it doesn't directly inherit from GenerationMixin. From 👉v4.50👈 onwards, PreTrainedModel will NOT inherit from GenerationMixin, and this model will lose the ability to call generate and other related functions.

  • If you're using trust_remote_code=True, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
  • If you are the owner of the model architecture code, please modify your model class such that it inherits from GenerationMixin (after PreTrainedModel, otherwise you'll get an exception).
  • If you are not the owner of the model architecture class, please contact the model code owner to update it. semantic_codec weights restored from: C:\Users\admin.cache\huggingface\hub\models--amphion--MaskGCT\snapshots\265c6cef07625665d0c28d2faafb1415562379dc\semantic_codec\model.safetensors cfm loaded length_regulator loaded gpt_layer loaded s2mel weights restored from: ./checkpoints\s2mel.pth campplus_model weights restored from: C:\Users\admin.cache\huggingface\hub\models--funasr--campplus\snapshots\fb71fe990cbf6031ae6987a2d76fe64f94377b7e\campplus_cn_common.bin Loading weights from nvidia/bigvgan_v2_22khz_80band_256x Removing weight norm... bigvgan weights restored from: nvidia/bigvgan_v2_22khz_80band_256x TextNormalizer loaded bpe model loaded from: ./checkpoints\bpe.model
  • Running on local URL: http://0.0.0.0:7860 Traceback (most recent call last): File "C:\Users\admin\index-tts\webui.py", line 350, in demo.launch(server_name=cmd_args.host, server_port=cmd_args.port) File "C:\Users\admin\index-tts.venv\lib\site-packages\gradio\blocks.py", line 2843, in launch raise Exception( Exception: Couldn't start the app because 'http://localhost:7860/gradio_api/startup-events' failed (code 503). Check your network or proxy settings to ensure localhost is accessible.

中间出来: Running on local URL: http://0.0.0.0:7860 时,在本地打开 http://127.0.0.1:7860是成功的,但是后续仍然报错退出

7

再次问好!:)

此错误意味着您需要按照安装说明安装NVIDIA CUDA Toolkit 。如果没有它,您将无法使用 GPU 加速:

[2025-09-10 12:54:55,538] [INFO] [real_accelerator.py:254:get_accelerator] Setting ds_accelerator to cuda (auto detect)
test.c
LINK : fatal error LNK1181: 无法打开输入文件“cufile.lib”

第二个致命错误意味着您的计算机上的网络配置不正确。它从端口 7860 启动,0.0.0.0这意味着“在每个网卡上启动”。

然后,它尝试通过检查是否http://localhost:7860/gradio_api/startup-events可访问来验证它是否正在运行。

这在您的机器上失败了,Gradio 提示localhost您的机器上不存在该功能。这非常奇怪,因为localhost这是每个操作系统的标准功能,这意味着您的机器配置不正确。这个错误与 IndexTTS 完全无关。

* Running on local URL:  http://0.0.0.0:7860
Traceback (most recent call last):
  File "C:\Users\admin\index-tts\webui.py", line 350, in <module>
    demo.launch(server_name=cmd_args.host, server_port=cmd_args.port)
  File "C:\Users\admin\index-tts\.venv\lib\site-packages\gradio\blocks.py", line 2843, in launch
    raise Exception(
Exception: Couldn't start the app because 'http://localhost:7860/gradio_api/startup-events' failed (code 503). Check your network or proxy settings to ensure localhost is accessible.

总结:

  • 安装 NVIDIA CUDA 工具包。
  • 修复您的机器的网络/互联网支持。;)