Retrieval-based-Voice-Conversion-WebUI icon indicating copy to clipboard operation
Retrieval-based-Voice-Conversion-WebUI copied to clipboard

Mac M2 can not run the inference

Open XXXXRT666 opened this issue 1 year ago • 14 comments

I have tried running both inference and batch inference, but it always stuck there, but I can run inference without using refer the index file my python version is 3.9.12 PyTorch version is 2.3.0.dev20240222, it's a nightly build version, should I install the stable one?

XXXXRT666 avatar Feb 26 '24 02:02 XXXXRT666

it doesn't work on PyTorch 2.2.1 either, I can see clearly from the Activity Monitor that the CPU and GPU usage is 0

XXXXRT666 avatar Feb 26 '24 02:02 XXXXRT666

I encountered the same problem as you. I noticed this error when running webUI. I don’t know if it is related.

/Users/qrviom2/Retrieval-based-Voice-Conversion-WebUI1006/.venv/lib/python3.8/site-packages/gradio_client/documentation.py:102: UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix' warnings.warn(f"Could not get documentation group for {cls}: {exc}") /Users/qrviom2/Retrieval-based-Voice-Conversion-WebUI1006/.venv/lib/python3.8/site-packages/gradio_client/documentation.py:102: UserWarning: Could not get documentation group for <class 'gradio.mix.Series'>: No known documentation group for module 'gradio.mix' warnings.warn(f"Could not get documentation group for {cls}: {exc}")

koosq avatar Feb 26 '24 04:02 koosq

我遇到了和你一樣的問題。我在運行 webUI 時注意到這個錯誤。不知道有沒有關係。

/Users/qrviom2/Retrieval-based-Voice-Conversion-WebUI1006/.venv/lib/python3.8/site-packages/gradio_client/documentation.py:102: UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix' warnings.warn(f"Could not get documentation group for {cls}: {exc}") /Users/qrviom2/Retrieval-based-Voice-Conversion-WebUI1006/.venv/lib/python3.8/site-packages/gradio_client/documentation.py:102: UserWarning: Could not get documentation group for <class 'gradio.mix.Series'>: No known documentation group for module 'gradio.mix' warnings.warn(f"Could not get documentation group for {cls}: {exc}")

I also encountered related problems, I don’t know if it will have any impact. :(

FEXAQAQ avatar Apr 10 '24 07:04 FEXAQAQ

我遇到了和你一样的问题。我在运行 webUI 时注意到这个错误。不知道有没有关系。 /Users/qrviom2/Retrieval-based-Voice-Conversion-WebUI1006/.venv/lib/python3.8/site-packages/gradio_client/documentation.py:102: UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix' warnings.warn(f"Could not get documentation group for {cls}: {exc}") /Users/qrviom2/Retrieval-based-Voice-Conversion-WebUI1006/.venv/lib/python3.8/site-packages/gradio_client/documentation.py:102: UserWarning: Could not get documentation group for <class 'gradio.mix.Series'>: No known documentation group for module 'gradio.mix' warnings.warn(f"Could not get documentation group for {cls}: {exc}")

我也遇到了相关问题,不知道有没有影响。 :(

I also encountered the same problem as you,has it been resolved?

chenqan avatar Apr 12 '24 03:04 chenqan

我遇到了和你一样的问题。我在运行 webUI 时注意到这个错误。不知道有没有关系。 /Users/qrviom2/Retrieval-based-Voice-Conversion-WebUI1006/.venv/lib/python3.8/site-packages/gradio_client/documentation.py:102: UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix' warnings.warn(f"Could not get documentation group for {cls}: {exc}") /Users/qrviom2/Retrieval-based-Voice-Conversion-WebUI1006/.venv/lib/python3.8/site-packages/gradio_client/documentation.py:102: UserWarning: Could not get documentation group for <class 'gradio.mix.Series'>: No known documentation group for module 'gradio.mix' warnings.warn(f"Could not get documentation group for {cls}: {exc}")

我也遇到了相关问题,不知道有没有影响。 :(

I also encountered the same problem as you,has it been resolved?

I haven't found a solution yet, if I find one I will share it :) I've been using it so far and the functions seem to be normal.

FEXAQAQ avatar Apr 12 '24 06:04 FEXAQAQ

@XXXXRT666 Can you give me more details?

Tps-F avatar May 02 '24 14:05 Tps-F

@XXXXRT666 Can you give me more details?

Yes, of course. I run it on python 3.9(anaconda) and python3.11(3.11 requirements installed). After I click the convert button, It does do the inference work, but no output. 截屏2024-05-02 15 40 04 After clicking unload 截屏2024-05-02 15 45 38 I think it stuck at inference. 截屏2024-05-02 15 40 56 using crepe, index

XXXXRT666 avatar May 02 '24 14:05 XXXXRT666

setting index ratio zero or just not using 截屏2024-05-02 15 49 25 截屏2024-05-02 16 34 03 Also, memory not released after unloading the model, I think it is related to PyTorch

the program stuck at score, ix = index.search(npy, k=8) (infer.modules.vc.pipeline.vc)

XXXXRT666 avatar May 02 '24 16:05 XXXXRT666

For training, index.train(big_npy) will lead to Segmentation fault

XXXXRT666 avatar May 02 '24 16:05 XXXXRT666

I've test the run.sh, the same result

XXXXRT666 avatar May 02 '24 20:05 XXXXRT666

@XXXXRT666 Thanks, I'll fix

Just to confirm, Does the inference work better if the index ratio is set to zero?

Tps-F avatar May 03 '24 10:05 Tps-F

@XXXXRT666 Thanks, I'll fix

Just to confirm, Does the inference work better if the index ratio is set to zero?

Yes, because if (... and index_rate != 0): will skip index.search() if the index rate is zero.

XXXXRT666 avatar May 03 '24 10:05 XXXXRT666

@XXXXRT666 In the meantime, I've fixed the problem of memory not being freed up. #2035

Tps-F avatar May 04 '24 18:05 Tps-F

Thank you for your great efforts.

XXXXRT666 avatar May 04 '24 20:05 XXXXRT666

fyi, index.search hangs because faiss is causing segfault when pytorch is imported. It's faiss's glitch. Faiss suggests macOS users to install via conda, which should in theory fix it.

for macOS users, you either:

  • use conda for faiss instead of pip.
  • build faiss from source yourself and install its python binding
  • change the code to spawn a separate subprocess to use faiss

dkenw avatar May 31 '24 12:05 dkenw

fyi, index.search hangs because faiss is causing segfault when pytorch is imported. It's faiss's glitch. Faiss suggests macOS users to install via conda, which should in theory fix it.

for macOS users, you either:

  • use conda for faiss instead of pip.
  • build faiss from source yourself and install its python binding
  • change the code to spawn a separate subprocess to use faiss

Thank you very much, this indeed worked.

XXXXRT666 avatar Jun 03 '24 18:06 XXXXRT666

fyi, index.search hangs because faiss is causing segfault when pytorch is imported. It's faiss's glitch. Faiss suggests macOS users to install via conda, which should in theory fix it.

for macOS users, you either:

  • use conda for faiss instead of pip.
  • build faiss from source yourself and install its python binding
  • change the code to spawn a separate subprocess to use faiss

@Tps-F

XXXXRT666 avatar Jun 03 '24 18:06 XXXXRT666

@XXXXRT666 How do you solve this problem ?

x4080 avatar Aug 05 '24 22:08 x4080

use conda to install, or install it from source code

XXXXRT666 avatar Aug 06 '24 06:08 XXXXRT666

@XXXXRT666 Thanks for the tip

x4080 avatar Aug 06 '24 20:08 x4080

Hi, I still cannot make it work using conda and pip, maybe I'm doing something wrong ? What I did was :

conda create -n env python=3.10
conda activate env
pip install -r requirements.txt
python ./infer-web.py

any help ? TIA

x4080 avatar Aug 06 '24 22:08 x4080

Ok I got it to work, here's the solution

conda create -n env python=3.10
conda activate env
pip install -r requirements.txt
pip uninstall numba faiss-cpu 
conda install conda-forge::numba pytorch::faiss-cpu
python ./infer-web.py

x4080 avatar Aug 06 '24 22:08 x4080