Skip to content

Commit 050ffd0

Browse files
authored
ROCm support for AMD GPUs on Linux (#1248)
* Added requirements for AMD GPUs * Updated README with instructions on how to use RVC with ROCm
1 parent a6456f6 commit 050ffd0

File tree

2 files changed

+78
-1
lines changed

2 files changed

+78
-1
lines changed

docs/en/README.en.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ pip install torch torchvision torchaudio
5757

5858
#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
5959
#pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
60+
61+
#For Linux + AMD Cards, you need to use the following pytorch versions:
62+
#pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2
6063
```
6164

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

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

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

87+
for AMD graphics cards on Linux (ROCm):
88+
pip install -r requirements-amd.txt
8489
```
8590

8691
------
@@ -135,8 +140,32 @@ Then use this command to start Webui:
135140
```bash
136141
python infer-web.py
137142
```
143+
138144
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.
139145
146+
## ROCm Support for AMD graphic cards (Linux only)
147+
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).
148+
149+
On Arch use pacman to install the driver:
150+
````
151+
pacman -S rocm-hip-sdk rocm-opencl-sdk
152+
````
153+
154+
You might also need to set these environment variables (e.g. on a RX6700XT):
155+
````
156+
export ROCM_PATH=/opt/rocm
157+
export HSA_OVERRIDE_GFX_VERSION=10.3.0
158+
````
159+
Also make sure your user is part of the `render` and `video` group:
160+
````
161+
sudo usermod -aG render $USERNAME
162+
sudo usermod -aG video $USERNAME
163+
````
164+
After that you can run the WebUI:
165+
```bash
166+
python infer-web.py
167+
```
168+
140169
## Credits
141170
+ [ContentVec](https://github.com/auspicious3000/contentvec/)
142171
+ [VITS](https://github.com/jaywalnut310/vits)

requirements-amd.txt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
tensorflow-rocm
2+
joblib>=1.1.0
3+
numba==0.56.4
4+
numpy==1.23.5
5+
scipy
6+
librosa==0.9.1
7+
llvmlite==0.39.0
8+
fairseq==0.12.2
9+
faiss-cpu==1.7.3
10+
gradio==3.34.0
11+
Cython
12+
pydub>=0.25.1
13+
soundfile>=0.12.1
14+
ffmpeg-python>=0.2.0
15+
tensorboardX
16+
Jinja2>=3.1.2
17+
json5
18+
Markdown
19+
matplotlib>=3.7.0
20+
matplotlib-inline>=0.1.3
21+
praat-parselmouth>=0.4.2
22+
Pillow>=9.1.1
23+
resampy>=0.4.2
24+
scikit-learn
25+
tensorboard
26+
tqdm>=4.63.1
27+
tornado>=6.1
28+
Werkzeug>=2.2.3
29+
uc-micro-py>=1.0.1
30+
sympy>=1.11.1
31+
tabulate>=0.8.10
32+
PyYAML>=6.0
33+
pyasn1>=0.4.8
34+
pyasn1-modules>=0.2.8
35+
fsspec>=2022.11.0
36+
absl-py>=1.2.0
37+
audioread
38+
uvicorn>=0.21.1
39+
colorama>=0.4.5
40+
pyworld==0.3.2
41+
httpx
42+
onnxruntime
43+
onnxruntime-gpu
44+
torchcrepe==0.0.20
45+
fastapi==0.88
46+
ffmpy==0.3.1
47+
python-dotenv>=1.0.0
48+
av

0 commit comments

Comments
 (0)