https://github.com/codename0og/rvc_onnx_infer
RVC Onnx Infer- Upgraded and simplified-ish
https://github.com/codename0og/rvc_onnx_infer
Last synced: 3 months ago
JSON representation
RVC Onnx Infer- Upgraded and simplified-ish
- Host: GitHub
- URL: https://github.com/codename0og/rvc_onnx_infer
- Owner: codename0og
- License: mit
- Created: 2023-12-09T05:13:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-09T17:02:33.000Z (about 2 years ago)
- Last Synced: 2025-08-11T21:34:44.379Z (10 months ago)
- Language: Python
- Homepage:
- Size: 71.3 KB
- Stars: 21
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Codename;0's improved RVC Onnx models Inference.
## THE PROJECT IS CURRENTLY PAUSED - NOT ABANDONED.
Currently, the basics work; you can infer just fine however there's a length limit ( despite the internal slicing ) of around 50 seconds - at least on my machine.
I have to find a better and more efficient segmentation mechanism, til then yea.
## Ready to be used with RVC V2 onnx models. ( CPU, Cuda and DML support )
### Todo:
- Adding index/faiss support
- Automating stuff / making i/o handling easier.
- Adding rmvpe f0 method
- Better automation and easier input/output managment + stuff picker.
- Possibly even a gui or web-ui ~ one day huh.
- Quite possibly a tflite model exporting for future Mobile-RVC-infer-port-project ( ***Not 100% sure yet, concept stage.*** )
# Usage guide:
### 1. First, prior to any inferencing, you gotta obtain the: '**vec-768-layer-12.onnx**' file from:
**https://huggingface.co/NaruseMioShirakana/MoeSS-SUBModel/tree/main**
Place it here: RVC_Onnx_Infer/assets/vec
> reference: '**RVC_Onnx_Infer/assets/vec/vec-768-layer-12.onnx**'
⠀
### 2. Your .onnx models land into '**onnx_models**' folder
( You set which one to use in the 30th line of '**RVC_Onnx_Infer.py**' script )
> model_path = os.path.join("onnx_models", "**Your_Model.onnx**") # Your .ONNX model
⠀
### 3. Your vocals for inference / acapella .wav goes into 'input' folder.
( Script will pick only the first found .wav in there, so, always have just 1 in there to avoid issues. )
⠀
### 4. Your inference outputs will appear in the '**outpit**' folder.
( One at a time. Any consecutive inferences will overwrite the previous file so, copy / move it somewhere else.
⠀
### 5. To switch the device to Cuda or DML, change "**cpu**" to any of the mentioned.
The 27th line of '**RVC_Onnx_Infer.py**' script;
> device = "**cpu**" # options: **dml**, **cuda**, **cpu**
⠀
### 6. To change hop_size, replace the '64' value with any desired.
The 22nd line of '**RVC_Onnx_Infer.py**' script;
> hop_size = 64 # hop size for inference. ( Currently, applies only to dio F0 )
> Try: 32, 64, 128, 256, 512 or custom of your choice.
⠀
⠀
⠀
# | v0.2a | 10.12.2023 - CHANGELOG:
### Changes:
- **Inference max length limit off** - No more '50 seconds max' per infer / file length.
( Now it's internally slicing, inferencing the segments 1 by 1 to avoid memory issues and merging it all into 1 final output. )
- **DML x CPU is set as default** for the main device.
- PM F0 Pitch estimation: Yea, I sorta fixed it but it's not perfect ( Doesn't support custom hop length too ) - Dio is better.
> That is, until a workaround for pitch offset / hop length related(?) is found.
- Cosmetics changes - Made the console a lil bit more fancy lol + logging of segmenting process and so on.
⠀
⠀
⠀
# INITIAL RELEASE: v0.1a
### Notes:
- Project is in an **early alpha-dev / test / debug state.**
- Currently only Dio F0 Pitch estimation until I figure out the rest.
- It is supporting **RVC V2 onnx models only.**
(V1 models do not work unless you get 256-layer-9 vec onnx and modify the code appropriately.)
⠀
- **CPU is set by default** as the main device for the sake of compatibility, need more testing.