IAHispano / Applio

A simple, high-quality voice conversion tool focused on ease of use and performance
https://applio.org
MIT License
1.81k stars 292 forks source link

Fix f0_model being loaded for every sample in batch inference. Infere… #842

Closed BornSaint closed 3 weeks ago

BornSaint commented 3 weeks ago

…nce time improved

Description

improved batch inference time

/tabs/inference/inference.py -> Changed the default input folder of Gradio to /assets/audios/inputs/ added /jit/ -> folder for RMVPE script changes (copied from https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI) but it's not being used yet /rvc/infer/ -> changed the get_f0() function to not load model again for batch inference /core.py -> changed run_infer_script() and run_batch_infer_script() to adapt the code to load f0 model once before get_f0() calls

Motivation and Context

I don't like too much to use UI, so i wanted a good RVC cli script. Then realized that inference time was bad compared to https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.

But now it's the same inference time. (from 27s to now 16s in my tests for 12 short samples)

How has this been tested?

Just running in CLI and UI modes.

Screenshots (if appropriate):

Types of changes

Checklist:

AznamirWoW commented 3 weeks ago

I've already done the fix this morning. This is not needed.

blaisewf commented 3 weeks ago

thats probably the strangest pr i have ever seen