Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

[Help]: 特征检索在webui推理中无法使用 #300

Open
3 tasks done
putongdisco opened this issue Jul 13, 2023 · 8 comments
Open
3 tasks done

[Help]: 特征检索在webui推理中无法使用 #300

putongdisco opened this issue Jul 13, 2023 · 8 comments
Assignees
Labels
help wanted The issue author is asking for help

Comments

@putongdisco
Copy link

请勾选下方的确认框。

  • 我已仔细阅读README.mdwiki中的Quick solution
  • 我已通过各种搜索引擎排查问题,我要提出的问题并不常见。
  • 我未在使用由第三方用户提供的一键包/环境包。

系统平台版本号

Windows 11 22H2

GPU 型号

RTX 3070Ti Laptop

Python版本

3.10.7

PyTorch版本

2.0.0+cu118

sovits分支

4.0(默认)

数据集来源(用于判断数据集质量)

语音

出现问题的环节或执行的命令

使用特征检索进行推理时

问题描述

在使用webui进行推理时,使用特征检索会报错,而聚类模型并不会出错。稍早前使用inference_main.py进行推理,特征检索也会报错

日志

Traceback (most recent call last):
  File "E:\so-vits-svc\webUI.py", line 205, in vc_fn
    output_file = vc_infer(output_format, sid, processed_audio, truncated_basename, vc_transform, auto_f0, cluster_ratio, slice_db, noise_scale, pad_seconds, cl_num, lg_num, lgr_num, f0_predictor, enhancer_adaptive_key, cr_threshold, k_step, use_spk_mix, second_encoding, loudness_envelope_adjustment)
  File "E:\so-vits-svc\webUI.py", line 144, in vc_infer
    _audio = model.slice_inference(
  File "E:\so-vits-svc\inference\infer_tool.py", line 460, in slice_inference
    out_audio, out_sr, out_frame = self.infer(spk, tran, raw_path,
  File "E:\so-vits-svc\inference\infer_tool.py", line 278, in infer
    c, f0, uv = self.get_unit_f0(wav, tran, cluster_infer_ratio, speaker, f0_filter,f0_predictor,cr_threshold=cr_threshold)
  File "E:\so-vits-svc\inference\infer_tool.py", line 233, in get_unit_f0
    self.big_npy = feature_index.reconstruct_n(0, feature_index.ntotal)
TypeError: in method 'Index_ntotal_get', argument 1 of type 'faiss::Index *'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\so-vits-svc\venv\lib\site-packages\gradio\routes.py", line 414, in run_predict
    output = await app.get_blocks().process_api(
  File "E:\so-vits-svc\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api
    result = await self.call_function(
  File "E:\so-vits-svc\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "E:\so-vits-svc\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "E:\so-vits-svc\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "E:\so-vits-svc\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "E:\so-vits-svc\webUI.py", line 211, in vc_fn
    raise gr.Error(e)
gradio.exceptions.Error: TypeError("in method 'Index_ntotal_get', argument 1 of type 'faiss::Index *'")

截图so-vits-svclogs/44k文件夹并粘贴到此处

/

补充说明

No response

@putongdisco putongdisco added the help wanted The issue author is asking for help label Jul 13, 2023
@ylzz1997
Copy link
Contributor

输入的文件似乎不是特征检索的文件,检查一下读取的是否是特征索引文件

@putongdisco
Copy link
Author

输入的文件似乎不是特征检索的文件,检查一下读取的是否是特征索引文件

检查过了,读取的文件的确是feature_and_index.pkl。而且我在使用inference_main.py进行推理时,同样会报错

Traceback (most recent call last):
  File "E:\so-vits-svc\inference_main.py", line 155, in <module>
    main()
  File "E:\so-vits-svc\inference_main.py", line 140, in main
    audio = svc_model.slice_inference(**kwarg)
  File "E:\so-vits-svc\inference\infer_tool.py", line 461, in slice_inference
    out_audio, out_sr, out_frame = self.infer(spk, tran, raw_path,
  File "E:\so-vits-svc\inference\infer_tool.py", line 279, in infer
    c, f0, uv = self.get_unit_f0(wav, tran, cluster_infer_ratio, speaker, f0_filter,f0_predictor,cr_threshold=cr_threshold)
  File "E:\so-vits-svc\inference\infer_tool.py", line 234, in get_unit_f0
    self.big_npy = feature_index.reconstruct_n(0, feature_index.ntotal)
TypeError: in method 'Index_ntotal_get', argument 1 of type 'faiss::Index *'

@ylzz1997
Copy link
Contributor

可否发一份feature_and_index.pkl,我确定一下原因

@ylzz1997
Copy link
Contributor

另外可否发一下faiss的版本号?

@putongdisco
Copy link
Author

可否发一份feature_and_index.pkl,我确定一下原因

https://drive.google.com/file/d/107Ugr9Ie3haj7Fk9yPYOOoG0537ComNA/view?usp=sharing
faiss-cpu 1.7.4

@yzmyyff
Copy link

yzmyyff commented Jul 19, 2023

I got the same error, Any progress?

@ylzz1997
Copy link
Contributor

可否发一份feature_and_index.pkl,我确定一下原因

https://drive.google.com/file/d/107Ugr9Ie3haj7Fk9yPYOOoG0537ComNA/view?usp=sharing faiss-cpu 1.7.4

我这边推理正常,猜测可能那边环境安装过两份faiss,尝试uninstall faiss后重装试试

@putongdisco
Copy link
Author

可否发一份feature_and_index.pkl,我确定一下原因

https://drive.google.com/file/d/107Ugr9Ie3haj7Fk9yPYOOoG0537ComNA/view?usp=sharing faiss-cpu 1.7.4

我这边推理正常,猜测可能那边环境安装过两份faiss,尝试uninstall faiss后重装试试

在提交issue之前已经试过卸载并重新安装,但还是一样报错

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted The issue author is asking for help
Projects
None yet
Development

No branches or pull requests

3 participants