#
RVC Disconnected
Last update: Mar 8, 2024
#
#
Introduction
#
RVC Disconnected (or RVC-D) is a port of Mangio to Google Colab, for exclusively training. Notebook made by Kit Lemonfoot.
It's free, includes all the necessary tools for a quality model, the TensorBoard, & it's the fastest Colab space for training.
Making it the go-to method for training for cloud RVC users. Pretty much the only big downside is the time limit (but you can switch to another account & continue).
#
Pros & Cons
The pros & cons are subjective to your necessities.
- Has TensorBoard.
- Has Mangio-Crepe.
- Option to save model to HF.
- Includes the latest pretrains.
- Inconvenient I.
- Takes some time to set up.
- You can't leave training unsupervised.
- For free users:
- It's slower compared to local RVC.
- Can't train long datasets without pausing the process.
#
#
Setting Up
#
WARNING:
1. The guide is centered around the TensorBoard. Read it first if you haven't already.
2. Turn on third-party cookies, or TB might not work.
#
#
1. Prepare dataset
Make a folder named after your model & move the dataset inside of it. Don't include spaces/special characters.
Then zip the folder as a
.ZIP
file. .7ZIP and .RAR aren't compatible with RVC-D.
REMINDER: With modern versions of RVC, the dataset can be a single audio file. No need to split it.
#
#
2. Set up Colab
Head over to the Colab space & Sign in to your Google account.
Execute the
Dependencies
cell & pressRun anyways
When this appears, press
Connect to Google Drive
& select your account.
Once the cell is done loading, in GD go to the
rvcDisconnected
folder, and place the dataset's .ZIP inside of it.
#
#
#
Training
#
#
1. Training variables
Go to the
Set Training Variables
cell.
# Define these values:
experiment_name
- Name your model. Don't include spaces/special characters.
pretrain_type
- If you aren't familiar with pretrains, select
original
. target_sample_rate
- Select your dataset's sample rate.
pitch_extraction_algorithm
- The extraction method. Don't use Harvest, as it's obsolete.
crepe_hop_length
- If you chose
Mangio-Crepe
, this defines the Hop Length.
#
#
2. Set the environment
Go to
Load Dataset
cell. In the dataset bar type the dataset's .ZIP name followed by .zip, then execute the cell.
Example:kalomaze.zip
Below, execute Preprocessing, Feature Extraction, & Save preprocessed dataset files to Google Drive.
#
#
3. Train Index
Run Index Training to create the model's .INDEX file.
To download it, in GD open
rvcDisconnected
& the folder named after the model. Download the .INDEX namedadded
.
#
#
4. Set Training
Go to the Training cell.
# Define these values:
save_frequency
- Frequency of the saving checkpoints, based on the epochs. If you're a newbie, simply leave it at
15
.
E.g: with a value of10
, it will be saved after the epoch 10, 20, 30, etc. total_epochs
- The total amount of epochs for the model. But since we'll use TensorBoard, use an arbitrarily large number like
2000
. batch_size
- Use
8
if you are a newbie. But if your dataset is small (around 2 minutes or less), use4
.
#
#
5. Begin training
- Execute the Training cell to begin training. TB will open up after a few seconds, & the graphs will take a minute to appear.
- Remember to monitor it, as well as the cell's logs. The latter will show you errors if they happen, and information about the epochs & checkpoints.
- While training, you might get disconnected if you:
- Stay AFK for a long time.
- Disconnect from your Internet.
- Don't solve the captchas that (might) pop up occasionally.
- Run out of GPU runtime.
#
#
6. Export model
- If after around 2:30 hours of training you don't detect overtraining, you must save the files so you can resume later, before the GPU runtime ends.
For this, first download the model of the lowest point (Step 7b) in case you are already overtraining.
Stop training by pressing the stop button of the Training cell.
Run the Export Model from Notebook to Drive cell.
Once your GPU runtime resets, begin the retraining procedure.
- After exporting, you are free to resume training until runtime is exhausted or close the session.
#
#
7. Download model.
When you're very sure of overtraining, you can stop training by pressing the stop button of the Training cell.
Click the folder symbol on the left.
(For mobile users: tap the three lines on the top left &Show file browser
)Open the
Mangio-RVC-Fork
folder, thenweights
. You'll find the checkpoints.
Right-click the one that's closest to before the overtraining point, and press
Download
.The models will be organized with this format: Name_Epoch_Step.pth.
E.g:arianagrande_e60_s120.pth
And that's all. To test it, do a normal inference as usual.
#
#
#
Resuming
#
If the training stops but the model still needed training, you don't have to start from scratch.
You can resume from the latest checkpoint. But for this, the cell Save preprocessed dataset files to Google Drive must have executed prior to training.
And if you're resuming from a new session, you should've ran the Export Model from Notebook to Drive cell in the previous session.
#
#
Instructions:
- Go to the Colab space, input the same criteria as before & execute the cells like normal, except Preprocessing & Feature Extraction.
Execute the Load preprocessed dataset files cell.
Go to the Import Model from Drive to Notebook cell. In STEPCOUNT introduce
2333333
& execute it.
- You can change the save frequency or increase the total epochs, in case you didn't input enough before.
- Run the Training cell to retrain. Remember to monitor TB as before.