# 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

✔️ PROS:
CONS
  • 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

#
#

# 1. Prepare dataset

  1. Make a folder named after your model & move the dataset inside of it. Don't include spaces/special characters.

    image

  2. Then zip the folder as a .ZIP file. .7ZIP and .RAR aren't compatible with RVC-D.

    image


#

# 2. Set up Colab

  1. Head over to the Colab space & Sign in to your Google account.

  2. Execute the Dependencies cell & press Run anyways

    image

  3. When this appears, press Connect to Google Drive & select your account.

    image

  4. Once the cell is done loading, in GD go to the rvcDisconnected folder, and place the dataset's .ZIP inside of it.

    image


#
#

# Training

#

# 1. Training variables

  1. Go to the Set Training Variables cell.

    image

  • # 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

‎ ‎ ‎ ‎ ‎ ‎ ‎ image

  1. 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

  2. Below, execute Preprocessing, Feature Extraction, & Save preprocessed dataset files to Google Drive.

    image


#

# 3. Train Index

  1. Run Index Training to create the model's .INDEX file.

    image

  2. To download it, in GD open rvcDisconnected & the folder named after the model. Download the .INDEX named added.

    image


#

# 4. Set Training

  • Go to the Training cell.

    image

  • # 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 of 10, 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), use 4.

#

# 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.
  1. For this, first download the model of the lowest point (Step 7b) in case you are already overtraining.

  2. Stop training by pressing the stop button of the Training cell.

  3. Run the Export Model from Notebook to Drive cell.

    image

  4. 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.

  1. When you're very sure of overtraining, you can stop training by pressing the stop button of the Training cell.

  2. 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, then weights. You'll find the checkpoints.

    image

  3. 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

  4. 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:

  1. Go to the Colab space, input the same criteria as before & execute the cells like normal, except Preprocessing & Feature Extraction.

  1. Execute the Load preprocessed dataset files cell.

    image


  1. Go to the Import Model from Drive to Notebook cell. In STEPCOUNT introduce 2333333 & execute it.

    image


  1. You can change the save frequency or increase the total epochs, in case you didn't input enough before.

  1. Run the Training cell to retrain. Remember to monitor TB as before.

#

# You have reached the end.

Report Issues