JarodMica / ai-voice-cloning

GNU General Public License v3.0
653 stars 144 forks source link

How many epochs for RVC & Tortoise TTS? + Need out of memory tips #38

Closed HopeAndFaithStudios closed 9 months ago

HopeAndFaithStudios commented 9 months ago

Hi, I'm new to AI training, I was wondering how many epochs I need and what batch size I should set on both Tortoise TTS and RVC (since I have both installed on my secondary NVIDIA laptop; including your repo), depending on the length of the dataset. My shortest model is 1 minute and 11 seconds, my longest one is 43 minutes 57 seconds. I just don't want to risk overtraining them and I really want them to sound accurate.

As for Tortoise, I was going to shorten the models to five or three -10 second segments, like it says on the GitHub page.

I also don't want to risk running into OOM (CUDA out of memory) since my secondary laptop has only 8 gigs of RAM (and possibly 4 gigs of VRAM). I really want to use my secondary laptop for this, since my primary one has AMD and is not supportive with any NVIDIA applications, and the desktop I have runs smoothly with 12 gigs of RAM, but I'd rather be portable.

I've been searching Google & Reddit a lot, only to find several different answers each time, so that didn't help much. Any advice would be very helpful, thanks. :)

JarodMica commented 9 months ago

This repository actually has a validation configuration button, so that should generally set it to values that'll work for you computer. With 4 GB of Vram, you can probably get away with 4 for your batch size and 1 for grad accum, play with these values depending on how much actual vram is being used.

Datasets I recommend at least being 10 minutes long. Any shorter and you may not be able to get a decent model with it being generally, the more the better.

As well, usually as long as both lines are trending downwards on the loss graph, you should be fine. However, most of the time, you won't know until you listen to the output of the model as to whether it's good or not unfortunately.