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

Add .sh run script for macOS & linux, fix error on macs with low vram.

Open Naozumi520 opened this issue 1 year ago • 6 comments

macOS users running RVC often experience issues due to the platform differences. Therefore, splitting requirements.txt for macOS is necessary. For example: training feature index on macOS only doable with faiss-cpu 1.7.0 (#695), higher or lower version will cause an error and directly crash RVC. Splitting out requirements.txt for macOS users is obviously much better than continuing to use the old version package for all platform users.

Also it makes it easier to set up the entire environment by running .sh files for macOS and Linux users. This script install missing dependencies for example, and install python3.8 (bets for this project) automatically.

Naozumi520 avatar Jul 12 '23 08:07 Naozumi520

As #252 and #311, faiss-cpu1.7.0 fails to install (I also tried it in M1 environment, but no luck). Did it work?

Tps-F avatar Jul 12 '23 12:07 Tps-F

Yes :D It worked for me, and feature index training worked without issue!

Naozumi520 avatar Jul 12 '23 12:07 Naozumi520

It was still not working in my environment. But it is a great PR and I want to merge it. Can you tell me what version of swig you use?

Tps-F avatar Jul 12 '23 12:07 Tps-F

Swig was not installed on my Mac?

naozumi@n218103174213 Retrieval-based-Voice-Conversion-WebUI-updated0618v2 % swig -version
zsh: command not found: swig
naozumi@n218103174213 Retrieval-based-Voice-Conversion-WebUI-updated0618v2 % which swig
swig not found
naozumi@n218103174213 Retrieval-based-Voice-Conversion-WebUI-updated0618v2 %

I installed faiss with pip btw.

Naozumi520 avatar Jul 12 '23 13:07 Naozumi520

I installed faiss-cpu in a virtual environment and the it installed without any problem?

naozumi@n218103174213 Retrieval-based-Voice-Conversion-WebUI-updated0618v2 % python3.8 -m venv faiss_test
naozumi@n218103174213 Retrieval-based-Voice-Conversion-WebUI-updated0618v2 % source faiss_test/bin/activate
(faiss_test) naozumi@n218103174213 Retrieval-based-Voice-Conversion-WebUI-updated0618v2 % pip install faiss-cpu==1.7.0
Collecting faiss-cpu==1.7.0
  Using cached faiss_cpu-1.7.0-cp38-cp38-macosx_10_14_x86_64.whl (1.9 MB)
Installing collected packages: faiss-cpu
Successfully installed faiss-cpu-1.7.0
WARNING: You are using pip version 21.1.1; however, version 23.1.2 is available.
You should consider upgrading via the '/Users/naozumi/Downloads/RVC/Retrieval-based-Voice-Conversion-WebUI-updated0618v2/faiss_test/bin/python3.8 -m pip install --upgrade pip' command.
(faiss_test) naozumi@n218103174213 Retrieval-based-Voice-Conversion-WebUI-updated0618v2 %
(faiss_test) naozumi@n218103174213 Retrieval-based-Voice-Conversion-WebUI-updated0618v2 % pip install faiss-cpu==1.7.0 --no-cache-dir
Collecting faiss-cpu==1.7.0
  Downloading faiss_cpu-1.7.0-cp38-cp38-macosx_10_14_x86_64.whl (1.9 MB)
     |████████████████████████████████| 1.9 MB 16.4 MB/s 
Installing collected packages: faiss-cpu
Successfully installed faiss-cpu-1.7.0
WARNING: You are using pip version 21.1.1; however, version 23.1.2 is available.
You should consider upgrading via the '/Users/naozumi/Downloads/RVC/Retrieval-based-Voice-Conversion-WebUI-updated0618v2/faiss_test/bin/python3.8 -m pip install --upgrade pip' command.
(faiss_test) naozumi@n218103174213 Retrieval-based-Voice-Conversion-WebUI-updated0618v2 %

For your references 👍 Updated: faiss doesn't seems to build on my Mac. Instead, it used the pre-built wheel Maybe it's the reason ?

Naozumi520 avatar Jul 12 '23 13:07 Naozumi520

I see the reason. I'm using intel Macs and it seems [email protected] have the pre-built wheel for x86_64 arch. https://pypi.tuna.tsinghua.edu.cn/simple/faiss-cpu/

I checked the list and did not see there's arm version... (1.7.0) D:

Naozumi520 avatar Jul 12 '23 13:07 Naozumi520

I've made changes to the .sh file and deleted requirements_macOS.txt . 👍

Naozumi520 avatar Jul 13 '23 06:07 Naozumi520

I almost got everything installed, but got stuck at this part: ImportError: cannot import name 'FFmpeg' from 'ffmpy' (/usr/local/lib/python3.8/site-packages/ffmpy/init.py) any help please?

ozpower avatar Aug 13 '23 08:08 ozpower

same here: ImportError: cannot import name 'FFprobe' from 'ffmpy'

i get this every time i try to use the "run.sh" script

an-internet-user001 avatar Aug 28 '23 18:08 an-internet-user001