Skip to content

Commit e9dd11b

Browse files
github-actions[bot]ChasonJiangTps-FShizukuNiafumiama
authored
chore(sync): merge dev into main (#1379)
* Optimize latency (#1259) * add attribute: configs/config.py Optimize latency: tools/rvc_for_realtime.py * new file: assets/Synthesizer_inputs.pth * fix: configs/config.py fix: tools/rvc_for_realtime.py * fix bug: infer/lib/infer_pack/models.py * new file: assets/hubert_inputs.pth new file: assets/rmvpe_inputs.pth modified: configs/config.py new features: infer/lib/rmvpe.py new features: tools/jit_export/__init__.py new features: tools/jit_export/get_hubert.py new features: tools/jit_export/get_rmvpe.py new features: tools/jit_export/get_synthesizer.py optimize: tools/rvc_for_realtime.py * optimize: tools/jit_export/get_synthesizer.py fix bug: tools/jit_export/__init__.py * Fixed a bug caused by using half on the CPU: infer/lib/rmvpe.py Fixed a bug caused by using half on the CPU: tools/jit_export/__init__.py Fixed CIRCULAR IMPORT: tools/jit_export/get_rmvpe.py Fixed CIRCULAR IMPORT: tools/jit_export/get_synthesizer.py Fixed a bug caused by using half on the CPU: tools/rvc_for_realtime.py * Remove useless code: infer/lib/rmvpe.py * Delete gui_v1 copy.py * Delete .vscode/launch.json * Delete jit_export_test.py * Delete tools/rvc_for_realtime copy.py * Delete configs/config.json * Delete .gitignore * Fix exceptions caused by switching inference devices: infer/lib/rmvpe.py Fix exceptions caused by switching inference devices: tools/jit_export/__init__.py Fix exceptions caused by switching inference devices: tools/rvc_for_realtime.py * restore * replace(you can undo this commit) * remove debug_print --------- Co-authored-by: Ftps <[email protected]> * Fixed some bugs when exporting ONNX model (#1254) * fix import (#1280) * fix import * lint * 🎨 同步 locale (#1242) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fix jit load and import issue (#1282) * fix jit model loading : infer/lib/rmvpe.py * modified: assets/hubert/.gitignore move file: assets/hubert_inputs.pth -> assets/hubert/hubert_inputs.pth modified: assets/rmvpe/.gitignore move file: assets/rmvpe_inputs.pth -> assets/rmvpe/rmvpe_inputs.pth fix import: gui_v1.py * feat(workflow): trigger on dev * feat(workflow): add close-pr on non-dev branch * Add input wav and delay time monitor for real-time gui (#1293) * feat(workflow): trigger on dev * feat(workflow): add close-pr on non-dev branch * 🎨 同步 locale (#1289) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat: edit PR template * add input wav and delay time monitor --------- Co-authored-by: 源文雨 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: RVC-Boss <[email protected]> * Optimize latency using scripted jit (#1291) * feat(workflow): trigger on dev * feat(workflow): add close-pr on non-dev branch * 🎨 同步 locale (#1289) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat: edit PR template * Optimize-latency-using-scripted: configs/config.py Optimize-latency-using-scripted: infer/lib/infer_pack/attentions.py Optimize-latency-using-scripted: infer/lib/infer_pack/commons.py Optimize-latency-using-scripted: infer/lib/infer_pack/models.py Optimize-latency-using-scripted: infer/lib/infer_pack/modules.py Optimize-latency-using-scripted: infer/lib/jit/__init__.py Optimize-latency-using-scripted: infer/lib/jit/get_hubert.py Optimize-latency-using-scripted: infer/lib/jit/get_rmvpe.py Optimize-latency-using-scripted: infer/lib/jit/get_synthesizer.py Optimize-latency-using-scripted: infer/lib/rmvpe.py Optimize-latency-using-scripted: tools/rvc_for_realtime.py * modified: infer/lib/infer_pack/models.py * fix some bug: configs/config.py fix some bug: infer/lib/infer_pack/models.py fix some bug: infer/lib/rmvpe.py * Fixed abnormal reference of logger in multiprocessing: infer/modules/train/train.py --------- Co-authored-by: 源文雨 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Format code (#1298) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * 🎨 同步 locale (#1299) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat: optimize actions * feat(workflow): add sync dev * feat: optimize actions * feat: optimize actions * feat: optimize actions * feat: optimize actions * feat: add jit options (#1303) Delete useless code: infer/lib/jit/get_synthesizer.py Optimized code: tools/rvc_for_realtime.py * Code refactor + re-design inference ui (#1304) * Code refacor + re-design inference ui * Fix tabname * i18n jp --------- Co-authored-by: Ftps <[email protected]> * feat: optimize actions * feat: optimize actions * Update README & en_US locale file (#1309) * critical: some bug fixes (#1322) * JIT acceleration switch does not support hot update * fix padding bug of rmvpe in torch-directml * fix padding bug of rmvpe in torch-directml * Fix STFT under torch_directml (#1330) * chore(format): run black on dev (#1318) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore(i18n): sync locale on dev (#1317) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat: allow for tta to be passed to uvr (#1361) * chore(format): run black on dev (#1373) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Added script for automatically download all needed models at install (#1366) * Delete modules.py * Add files via upload * Add files via upload * Add files via upload * Add files via upload * chore(i18n): sync locale on dev (#1377) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore(format): run black on dev (#1376) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Update IPEX library (#1362) * Update IPEX library * Update ipex index * chore(format): run black on dev (#1378) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Chengjia Jiang <[email protected]> Co-authored-by: Ftps <[email protected]> Co-authored-by: shizuku_nia <[email protected]> Co-authored-by: Ftps <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: 源文雨 <[email protected]> Co-authored-by: yxlllc <[email protected]> Co-authored-by: RVC-Boss <[email protected]> Co-authored-by: Blaise <[email protected]> Co-authored-by: Rice Cake <[email protected]> Co-authored-by: AWAS666 <[email protected]> Co-authored-by: Dmitry <[email protected]> Co-authored-by: Disty0 <[email protected]>
1 parent fe166e7 commit e9dd11b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2008
-1114
lines changed

README.md

+31-4
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,16 @@ poetry install
6868
你也可以通过 pip 来安装依赖:
6969
```bash
7070
N卡:
71-
72-
pip install -r requirements.txt
71+
pip install -r requirements.txt
7372

7473
A卡/I卡:
75-
pip install -r requirements-dml.txt
74+
pip install -r requirements-dml.txt
75+
76+
A卡Rocm(Linux):
77+
pip install -r requirements-amd.txt
7678

79+
I卡IPEX(Linux):
80+
pip install -r requirements-ipex.txt
7781
```
7882

7983
------
@@ -122,11 +126,34 @@ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/rmvpe.pt
122126
```bash
123127
python infer-web.py
124128
```
125-
126129
如果你正在使用Windows 或 macOS,你可以直接下载并解压`RVC-beta.7z`,前者可以运行`go-web.bat`以启动WebUI,后者则运行命令`sh ./run.sh`以启动WebUI。
127130

131+
对于需要使用IPEX技术的I卡用户,请先在终端执行`source /opt/intel/oneapi/setvars.sh`(仅Linux)。
132+
128133
仓库内还有一份`小白简易教程.doc`以供参考。
129134

135+
## AMD显卡Rocm相关(仅Linux)
136+
如果你想基于AMD的Rocm技术在Linux系统上运行RVC,请先在[这里](https://rocm.docs.amd.com/en/latest/deploy/linux/os-native/install.html)安装所需的驱动。
137+
138+
若你使用的是Arch Linux,可以使用pacman来安装所需驱动:
139+
````
140+
pacman -S rocm-hip-sdk rocm-opencl-sdk
141+
````
142+
对于某些型号的显卡,你可能需要额外配置如下的环境变量(如:RX6700XT):
143+
````
144+
export ROCM_PATH=/opt/rocm
145+
export HSA_OVERRIDE_GFX_VERSION=10.3.0
146+
````
147+
同时确保你的当前用户处于`render``video`用户组内:
148+
````
149+
sudo usermod -aG render $USERNAME
150+
sudo usermod -aG video $USERNAME
151+
````
152+
之后运行WebUI:
153+
```bash
154+
python infer-web.py
155+
```
156+
130157
## 参考项目
131158
+ [ContentVec](https://github.com/auspicious3000/contentvec/)
132159
+ [VITS](https://github.com/jaywalnut310/vits)

assets/Synthesizer_inputs.pth

120 KB
Binary file not shown.

assets/hubert/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*
22
!.gitignore
3+
!hubert_inputs.pth

assets/hubert/hubert_inputs.pth

165 KB
Binary file not shown.

assets/rmvpe/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*
22
!.gitignore
3+
!rmvpe_inputs.pth

assets/rmvpe/rmvpe_inputs.pth

32.7 KB
Binary file not shown.

configs/config.json

+1-15
Original file line numberDiff line numberDiff line change
@@ -1,15 +1 @@
1-
{
2-
"pth_path": "assets/weights/kikiV1.pth",
3-
"index_path": "logs/kikiV1.index",
4-
"sg_input_device": "VoiceMeeter Output (VB-Audio Vo (MME)",
5-
"sg_output_device": "VoiceMeeter Aux Input (VB-Audio (MME)",
6-
"threhold": -45.0,
7-
"pitch": 12.0,
8-
"index_rate": 0.0,
9-
"rms_mix_rate": 0.0,
10-
"block_time": 0.25,
11-
"crossfade_length": 0.04,
12-
"extra_time": 2.0,
13-
"n_cpu": 6.0,
14-
"f0method": "rmvpe"
15-
}
1+
{"pth_path": "assets/weights/kikiV1.pth", "index_path": "logs/kikiV1.index", "sg_input_device": "VoiceMeeter Output (VB-Audio Vo (MME)", "sg_output_device": "VoiceMeeter Input (VB-Audio Voi (MME)", "threhold": -45.0, "pitch": 2.0, "rms_mix_rate": 0.0, "index_rate": 0.0, "block_time": 0.52, "crossfade_length": 0.15, "extra_time": 2.46, "n_cpu": 6.0, "use_jit": false, "f0method": "rmvpe"}

configs/config.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from infer.modules.ipex import ipex_init
1414

1515
ipex_init()
16-
except Exception:
16+
except Exception: # pylint: disable=broad-exception-caught
1717
pass
1818
import logging
1919

@@ -44,6 +44,7 @@ class Config:
4444
def __init__(self):
4545
self.device = "cuda:0"
4646
self.is_half = True
47+
self.use_jit = False
4748
self.n_cpu = 0
4849
self.gpu_name = None
4950
self.json_config = self.load_config_json()
@@ -122,6 +123,15 @@ def has_xpu() -> bool:
122123
def use_fp32_config(self):
123124
for config_file in version_config_list:
124125
self.json_config[config_file]["train"]["fp16_run"] = False
126+
with open(f"configs/{config_file}", "r") as f:
127+
strr = f.read().replace("true", "false")
128+
with open(f"configs/{config_file}", "w") as f:
129+
f.write(strr)
130+
with open("infer/modules/train/preprocess.py", "r") as f:
131+
strr = f.read().replace("3.7", "3.0")
132+
with open("infer/modules/train/preprocess.py", "w") as f:
133+
f.write(strr)
134+
print("overwrite preprocess and configs.json")
125135

126136
def device_config(self) -> tuple:
127137
if torch.cuda.is_available():
@@ -237,4 +247,5 @@ def device_config(self) -> tuple:
237247
)
238248
except:
239249
pass
250+
print("is_half:%s, device:%s" % (self.is_half, self.device))
240251
return x_pad, x_query, x_center, x_max

docs/en/README.en.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ sh ./run.sh
9797
## Preparation of other Pre-models
9898
RVC requires other pre-models to infer and train.
9999

100-
You need to download them from our [Huggingface space](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/).
100+
```bash
101+
#Download all needed models from https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/
102+
python tools/download_models.py
103+
```
104+
105+
Or just download them by yourself from our [Huggingface space](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/).
101106

102107
Here's a list of Pre-models and other files that RVC needs:
103108
```bash

0 commit comments

Comments
 (0)