Skip to content

Commit

Permalink
ROCm support for AMD GPUs on Linux (RVC-Project#1248)
Browse files Browse the repository at this point in the history
* Added requirements for AMD GPUs
* Updated README with instructions on how to use RVC with ROCm
  • Loading branch information
WorXeN authored Sep 15, 2023
1 parent a6456f6 commit 050ffd0
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 1 deletion.
31 changes: 30 additions & 1 deletion docs/en/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ pip install torch torchvision torchaudio

#For Windows + Nvidia Ampere Architecture(RTX30xx), you need to specify the cuda version corresponding to pytorch according to the experience of https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/21
#pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117

#For Linux + AMD Cards, you need to use the following pytorch versions:
#pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2
```

Then can use poetry to install the other dependencies:
Expand All @@ -75,12 +78,14 @@ You can also use pip to install them:
for Nvidia graphics cards
pip install -r requirements.txt

for AMD/Intel graphics cards:
for AMD/Intel graphics cards on Windows (DirectML)
pip install -r requirements-dml.txt

for Intel ARC graphics cards on Linux / WSL using Python 3.10:
pip install -r requirements-ipex.txt

for AMD graphics cards on Linux (ROCm):
pip install -r requirements-amd.txt
```

------
Expand Down Expand Up @@ -135,8 +140,32 @@ Then use this command to start Webui:
```bash
python infer-web.py
```
If you are using Windows or macOS, you can download and extract `RVC-beta.7z` to use RVC directly by using `go-web.bat` on windows or `sh ./run.sh` on macOS to start Webui.
## ROCm Support for AMD graphic cards (Linux only)
To use ROCm on Linux install all required drivers as described [here](https://rocm.docs.amd.com/en/latest/deploy/linux/os-native/install.html).
On Arch use pacman to install the driver:
````
pacman -S rocm-hip-sdk rocm-opencl-sdk
````
You might also need to set these environment variables (e.g. on a RX6700XT):
````
export ROCM_PATH=/opt/rocm
export HSA_OVERRIDE_GFX_VERSION=10.3.0
````
Also make sure your user is part of the `render` and `video` group:
````
sudo usermod -aG render $USERNAME
sudo usermod -aG video $USERNAME
````
After that you can run the WebUI:
```bash
python infer-web.py
```
## Credits
+ [ContentVec](https://github.com/auspicious3000/contentvec/)
+ [VITS](https://github.com/jaywalnut310/vits)
Expand Down
48 changes: 48 additions & 0 deletions requirements-amd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
tensorflow-rocm
joblib>=1.1.0
numba==0.56.4
numpy==1.23.5
scipy
librosa==0.9.1
llvmlite==0.39.0
fairseq==0.12.2
faiss-cpu==1.7.3
gradio==3.34.0
Cython
pydub>=0.25.1
soundfile>=0.12.1
ffmpeg-python>=0.2.0
tensorboardX
Jinja2>=3.1.2
json5
Markdown
matplotlib>=3.7.0
matplotlib-inline>=0.1.3
praat-parselmouth>=0.4.2
Pillow>=9.1.1
resampy>=0.4.2
scikit-learn
tensorboard
tqdm>=4.63.1
tornado>=6.1
Werkzeug>=2.2.3
uc-micro-py>=1.0.1
sympy>=1.11.1
tabulate>=0.8.10
PyYAML>=6.0
pyasn1>=0.4.8
pyasn1-modules>=0.2.8
fsspec>=2022.11.0
absl-py>=1.2.0
audioread
uvicorn>=0.21.1
colorama>=0.4.5
pyworld==0.3.2
httpx
onnxruntime
onnxruntime-gpu
torchcrepe==0.0.20
fastapi==0.88
ffmpy==0.3.1
python-dotenv>=1.0.0
av

0 comments on commit 050ffd0

Please sign in to comment.