[GH-ISSUE #1592] ONNX is up to date? #1060

Closed
opened 2026-10-20 10:05:35 +00:00 by bsakaguchi · 13 comments
Owner

Originally created by @CircuitCM on GitHub (Dec 6, 2023).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1592

Hello,

Wondering if onnx_inference.py is up to date? I want to get inferencing working programmatically for my own work. It seems like rmvpe and crepe are not supported? Would it be best for me to rely on the vc.pipeline module instead? Thanks

def get_f0_predictor(f0_predictor, hop_length, sampling_rate, **kargs):
    if f0_predictor == "pm":
        from lib.infer_pack.modules.F0Predictor.PMF0Predictor import PMF0Predictor

        f0_predictor_object = PMF0Predictor(
            hop_length=hop_length, sampling_rate=sampling_rate
        )
    elif f0_predictor == "harvest":
        from lib.infer_pack.modules.F0Predictor.HarvestF0Predictor import (
            HarvestF0Predictor,
        )

        f0_predictor_object = HarvestF0Predictor(
            hop_length=hop_length, sampling_rate=sampling_rate
        )
    elif f0_predictor == "dio":
        from lib.infer_pack.modules.F0Predictor.DioF0Predictor import DioF0Predictor

        f0_predictor_object = DioF0Predictor(
            hop_length=hop_length, sampling_rate=sampling_rate
        )
    else:
        raise Exception("Unknown f0 predictor")
    return f0_predictor_object
Originally created by @CircuitCM on GitHub (Dec 6, 2023). Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1592 Hello, Wondering if onnx_inference.py is up to date? I want to get inferencing working programmatically for my own work. It seems like rmvpe and crepe are not supported? Would it be best for me to rely on the vc.pipeline module instead? Thanks ```python def get_f0_predictor(f0_predictor, hop_length, sampling_rate, **kargs): if f0_predictor == "pm": from lib.infer_pack.modules.F0Predictor.PMF0Predictor import PMF0Predictor f0_predictor_object = PMF0Predictor( hop_length=hop_length, sampling_rate=sampling_rate ) elif f0_predictor == "harvest": from lib.infer_pack.modules.F0Predictor.HarvestF0Predictor import ( HarvestF0Predictor, ) f0_predictor_object = HarvestF0Predictor( hop_length=hop_length, sampling_rate=sampling_rate ) elif f0_predictor == "dio": from lib.infer_pack.modules.F0Predictor.DioF0Predictor import DioF0Predictor f0_predictor_object = DioF0Predictor( hop_length=hop_length, sampling_rate=sampling_rate ) else: raise Exception("Unknown f0 predictor") return f0_predictor_object ```
bsakaguchi 2026-10-20 10:05:35 +00:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@codename0og commented on GitHub (Dec 9, 2023):

Dio works, harvest in there is broken, others most likely too.
I suppose you'd have to implement other methods on your own
I too plan on doing it, somehow, but it might take a heck of time given ain't a programmer, yea
but overal, I'd rely on vc.pipeline for referencing yea as onnx demo's code is outdated or just simply stripped

btw, you can get rvc onnx models ( imo best way atm ) simply by using 0618 release, newer are broken that way.
( tho, change opset_version=13, to 16 in infer-web, + get the latest runtime, 1.16.3, works all fine. )

<!-- gh-comment-id:1848018272 --> @codename0og commented on GitHub (Dec 9, 2023): Dio works, harvest in there is broken, others most likely too. I suppose you'd have to implement other methods on your own I too plan on doing it, somehow, but it might take a heck of time given ain't a programmer, yea but overal, I'd rely on vc.pipeline for referencing yea as onnx demo's code is outdated or just simply stripped btw, you can get rvc onnx models ( imo best way atm ) simply by using 0618 release, newer are broken that way. ( tho, change opset_version=13, to 16 in infer-web, + get the latest runtime, 1.16.3, works all fine. )
Author
Owner

@THE-SINDOL commented on GitHub (Dec 16, 2023):

i think f-tps was corrected on new repo...

<!-- gh-comment-id:1858621849 --> @THE-SINDOL commented on GitHub (Dec 16, 2023): i think f-tps was corrected on new repo...
Author
Owner

@codename0og commented on GitHub (Dec 16, 2023):

i think f-tps was corrected on new repo...

nope, if you mean the most recent " bug fix " then nope, still broken

<!-- gh-comment-id:1858732042 --> @codename0og commented on GitHub (Dec 16, 2023): > i think f-tps was corrected on new repo... nope, if you mean the most recent " bug fix " then nope, still broken
Author
Owner

@CircuitCM commented on GitHub (Dec 16, 2023):

@codename0og Luckily I can code a little. I've tested it and at least for inferencing RMVPE is definitely the best. I also found it wasn't relevant to update the ONNX framework because all the online models use .pth .index files and a decent part of the pitch extracting and inferencing code would need to be rewritten anyway. The point of the ONNX export is for it to be easy and low-code but that wasn't the case.

Instead I just finished a fork that is very light weight, easy to install and built just for inference and includes RMVPE. It works for python 3.11 and it's simple to slot into existing code.

Check it out if you want.

<!-- gh-comment-id:1858973386 --> @CircuitCM commented on GitHub (Dec 16, 2023): @codename0og Luckily I can code a little. I've tested it and at least for inferencing RMVPE is definitely the best. I also found it wasn't relevant to update the ONNX framework because all the online models use .pth .index files and a decent part of the pitch extracting and inferencing code would need to be rewritten anyway. The point of the ONNX export is for it to be easy and low-code but that wasn't the case. Instead I just finished a fork that is very light weight, easy to install and built just for inference and includes RMVPE. It works for python 3.11 and it's simple to slot into existing code. [Check it out if you want. ](https://github.com/CircuitCM/RVC-inference)
Author
Owner

@Tps-F commented on GitHub (Dec 17, 2023):

I fixed the Harvest issue, is this the issue about the problem reported by @codename0og before?
Please describe the specific problem or error code

<!-- gh-comment-id:1859184153 --> @Tps-F commented on GitHub (Dec 17, 2023): I fixed the Harvest issue, is this the issue about the problem reported by @codename0og before? Please describe the specific problem or error code
Author
Owner

@bzp83 commented on GitHub (Mar 18, 2024):

I fixed the Harvest issue, is this the issue about the problem reported by @codename0og before? Please describe the specific problem or error code

how did you fix it?

<!-- gh-comment-id:2003264785 --> @bzp83 commented on GitHub (Mar 18, 2024): > I fixed the Harvest issue, is this the issue about the problem reported by @codename0og before? Please describe the specific problem or error code how did you fix it?
Author
Owner

@codename0og commented on GitHub (Mar 18, 2024):

@bzp83
You gotta open up the:
infer/lib/infer_pack/modules/F0Predictor/HarvestF0Predictor.py

and replace:
fs=self.hop_length,

with:
fs=self.sampling_rate,

and that's pretty much it.
If you're searching for simple onnx inference, check it out:
https://github.com/codename0og/RVC_Onnx_Infer

I have in plans on potentially expanding my rvc fork ( non published yet ) with onnx infer incl. index support and other f0 methods if that's within anyone's interest.

<!-- gh-comment-id:2004687409 --> @codename0og commented on GitHub (Mar 18, 2024): @bzp83 You gotta open up the: infer/lib/infer_pack/modules/F0Predictor/HarvestF0Predictor.py and replace: `fs=self.hop_length,` with: `fs=self.sampling_rate,` and that's pretty much it. If you're searching for simple onnx inference, check it out: https://github.com/codename0og/RVC_Onnx_Infer I have in plans on potentially expanding my rvc fork ( non published yet ) with onnx infer incl. index support and other f0 methods if that's within anyone's interest.
Author
Owner

@bzp83 commented on GitHub (Mar 18, 2024):

@bzp83 You gotta open up the: infer/lib/infer_pack/modules/F0Predictor/HarvestF0Predictor.py

and replace: fs=self.hop_length,

with: fs=self.sampling_rate,

and that's pretty much it. If you're searching for simple onnx inference, check it out: https://github.com/codename0og/RVC_Onnx_Infer

I have in plans on potentially expanding my rvc fork ( non published yet ) with onnx infer incl. index support and other f0 methods if that's within anyone's interest.

thanks! it worked.

Your project is good, easier to use. Thanks. I starred it.

Any idea about how to use RMVPE?

thanks!

<!-- gh-comment-id:2005060270 --> @bzp83 commented on GitHub (Mar 18, 2024): > @bzp83 You gotta open up the: infer/lib/infer_pack/modules/F0Predictor/HarvestF0Predictor.py > > and replace: `fs=self.hop_length,` > > with: `fs=self.sampling_rate,` > > and that's pretty much it. If you're searching for simple onnx inference, check it out: https://github.com/codename0og/RVC_Onnx_Infer > > I have in plans on potentially expanding my rvc fork ( non published yet ) with onnx infer incl. index support and other f0 methods if that's within anyone's interest. thanks! it worked. Your project is good, easier to use. Thanks. I starred it. Any idea about how to use RMVPE? thanks!
Author
Owner

@codename0og commented on GitHub (Mar 19, 2024):

@bzp83 you'd have to implement it as there's just pm, dio, harvest rn

<!-- gh-comment-id:2005644170 --> @codename0og commented on GitHub (Mar 19, 2024): @bzp83 you'd have to implement it as there's just pm, dio, harvest rn
Author
Owner

@bzp83 commented on GitHub (Mar 19, 2024):

@bzp83 you'd have to implement it as there's just pm, dio, harvest rn

I can try that if that's the fastest... do you think that is the fastest if I have CPU only? If it's not, what's the best/fastest one for CPU?

thanks!

<!-- gh-comment-id:2005793660 --> @bzp83 commented on GitHub (Mar 19, 2024): > @bzp83 you'd have to implement it as there's just pm, dio, harvest rn I can try that if that's the fastest... do you think that is the fastest if I have CPU only? If it's not, what's the best/fastest one for CPU? thanks!
Author
Owner

@codename0og commented on GitHub (Mar 20, 2024):

@bzp83 well, tbf, rmvpe is the fastest if we speak of quality but if pure pure performance is what you crave for, I'd say PM and Dio are the fastest

<!-- gh-comment-id:2009405849 --> @codename0og commented on GitHub (Mar 20, 2024): @bzp83 well, tbf, rmvpe is the fastest if we speak of quality but if pure pure performance is what you crave for, I'd say PM and Dio are the fastest
Author
Owner

@bzp83 commented on GitHub (Mar 20, 2024):

@bzp83 well, tbf, rmvpe is the fastest if we speak of quality but if pure pure performance is what you crave for, I'd say PM and Dio are the fastest

thank you!!

<!-- gh-comment-id:2009522007 --> @bzp83 commented on GitHub (Mar 20, 2024): > @bzp83 well, tbf, rmvpe is the fastest if we speak of quality but if pure pure performance is what you crave for, I'd say PM and Dio are the fastest thank you!!
Author
Owner

@github-actions[bot] commented on GitHub (May 5, 2024):

This issue was closed because it has been inactive for 15 days since being marked as stale.

<!-- gh-comment-id:2094573249 --> @github-actions[bot] commented on GitHub (May 5, 2024): This issue was closed because it has been inactive for 15 days since being marked as stale.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RVC-Project/Retrieval-based-Voice-Conversion-WebUI#1060
No description provided.