Applio
Getting Started

Alternatives on the Cloud

Before starting. Note that launching any external interfaces (UIs) through Google Colaboratory is against the ToS of the platform. Running these can cause limitations to your Google Account, if you understand the risks you can continue to use the following alternative.

Otherwise you can choose to use others such as Applio No UI.

Applio UI Colab

Enter the Applio Colab

When inside execute the following two cells

Applio Colab

Access the interface

You will find that when the first “Install Applio” cell finishes executing the next one will give a URL, normally this is offered via gradio, but currently this tunnel disconnects the execution environment, it is recommended to activate the “Share tunnel” checkbox and follow the following simple procedure

  • Open the given URL.

  • Paste the IP given on Collab.

    Applio Colab Tunel

and yap, that's all, have fun using the Applio UI version!

In case you want to train in the UI version, it is advisable to use the advanced options in order not to lose progress in case of disconnection.

How to export my model to my Google Drive?

To save your model, there are three ways to do it:

  • Finished Model: Go to the Export Model section in the Train tab, click on the Refresh button and select the pth and the added index of the model to export. Finally, click on the Upload button, your model will be found in the ApplioExported folder ready to be used.

  • Model to continue training: If you want to save all the archives of your model folder in your Drive, you just need to run the Mount Drive and AutoBackup cell before run Start Applio cell, your model folder will be found inside the ApplioBackup folder.

  • Manual (NOT RECOMENDED): Click on 📁 in Colab and locate the added index of your model in the program/logs/model folder, and the .pth files are in the program/logs/zips folder so you can download them. If you want to save your model folder in your Drive, you just need to cancel the Start Applio cell and run the Mount Drive cell to be able to move it to your Google Drive.

How to resume training in Google Colab?

If the model still needs training, simply do the following:

  • Run the same cells as before, but now you’ll need to enter your model name in Load a backup and run it.

  • Then, in the Applio interface, input your model name, use the same sample rate, and proceed to the last part of the train tab. Set the same batch size, pretrained (if you used) and increase the number of epochs you want to train.

Code to be afk

If you want to remain inactive without fear of being disconnected from your environment run this Java Script on your browser console, press the keys Ctrl + Shift + i to open the developer tools option and the following window will open. In case another window is displayed, we can locate it by selecting the Console option, so in this way Colab will not disconnect during the separation process. First, we put Allow pasting, then we press enter and only then it will let us enter the code.

function ClickConnect() {
  var iconElement = document.getElementById("toggle-header-button");
  if (iconElement) {
    var clickEvent = new MouseEvent("click", {
      bubbles: true,
      cancelable: true,
      view: window,
    });
    iconElement.dispatchEvent(clickEvent);
  }
}
setInterval(ClickConnect, 6000);

To use the CLI version, enter to the Applio No UI Colab. Click on the installation cell. If everything runs correctly, you can proceed to the next step. In case a pop-up window appears asking you to restart the environment, select Restart. Once the environment has restarted, run the cell above the installation cell and then run the installation cell again.

The notebook is easy to understand, even more so when this notebook shares the same processes as the UI version!, so you can be guided by the existing explanations such as Training or Inference.

Finally, if you had the auto_backup option enabled, your model will be saved to your Google Drive in case it needs to resume training or upload or download files in Google Colab, click on the 📁 located in the left sidebar. This will open the file explorer, which allows you to transfer documents almost instantly between Google Drive and Colab. This feature facilitates file management, allowing you to quickly access and move data without hassle.

How to use custom pretrained in Applio No UI?

  • Download the pretrained you want to use and upload the d.pth and g.pth files to your Google Drive.

  • Click on 📁 in Colab, and create a new folder named pretrained_custom inside the pretraineds folder located in Applio/rvc/pretraineds.

  • Locate your pretrained model on your Google Drive and drag it into the newly created folder.

  • Finally, copy the path of G.pth and paste it into g_pretrained_path, and do the same for D.pth into d_pretrained_path. It should look like this: /content/Applio/rvc/pretraineds/pretraineds_custom/G48k.pth and /content/Applio/rvc/pretraineds/pretraineds_custom/D48k.pth, make sure to select the sample rate according to the sample rate of the custom pretraineds.

Kaggle

Create your Kaggle and Ngrok account

  • Create an account on Kaggle
  • You will then need to verify your phone number in order to activate Kaggle's Internet option.
  • Create an account on Ngrok

Set the environment

  • Enter Applio Kaggle and click on Copy and edit and it will clone the notebook to your account.
  • In the session options in the sidebar, you must enable the Internet option to access the Kaggle GPU. Make sure that in Persistence the Variables and Files option is enabled.
  • Turn on the 2 T4 GPUs in the accelerator.
  • Enable Headless mode to run the GPU in all sessions and save your progress in case you leave the page. Note that the GPU session will continue and may consume usage.

Running Applio

How to upload your dataset to ImJoy elFinder

  • Click on File Url and then on Visit Site.
  • Create a folder with the name of your model inside the datasets folder located in /kaggle/working/program_ml/assets/datasets and upload the audios
  • Finally go to the Training section.

Hugging Face

Hugging Face is a artificial intelligence and machine learning community, where you can collaborate on models, datasets, and applications. HugginFace has a section called “Spaces”, which allows to build applications and run them using CPUs or GPUs.

  • Applio is available as a space, you can use it directly without registering via Applio Web.

  • Or you can go to the Hugging Face website and create an account. Then, enter to the Applio space, go to the top bar, click on the three-dot icon on the right and select “Duplicate this space”. This will duplicate the program in a private running environment for you.

Duplicate HF Space

Please note that the space is limited to Inference and TTS only, as it runs on a free CPU. The processing time is not optimal, and the longer the uploaded audio, the longer it will take. You can use the split audio option to help mitigate this.

Paperspace

Paperspace is a cloud platform that provides access to powerful virtual machines with dedicated GPU for software development, machine learning, artificial intelligence, and other applications that require substantial processing power. This has made it one of the most competent paid alternatives to Colab.

Create an account

First you should create an account on Paperspace

During the account creation

  • You will be asked for account verification, so you will need to enter a phone number and input the received verification code.
  • You should know that Paperspace’s free plan is quite poor, and there’s nothing you can do about it. So, you should consider paying for a Pro or Growth plan.
  • Paperspace has joined DigitalOcean, so you can also pay with PayPal or Google Pay!.
  • You can pay by the hour for a dedicated GPU instead of using the default free ones or the paid plan.
  • You will need to clarify some additional account details before starting to use Paperspace.

Buy a Paperspace plan

Once the account is created, you will need to choose a Paperspace plan. To do this, click on Upgrade and select the one that suits your preference. The best option is the Pro plan.

Set up your Paperpsace environment

Go to the Gradient tab and click on the Create button:

  • Select the template: Start from Scratch
  • Select a avaible GPU
  • Select the number of hours your computer will remain active. Then click on Start Notebook.

Install Applio in your environment

Now type the following commands one at a time in the terminal; this is only for the first time:

git clone https://github.com/IAHispano/Applio.git
cd /notebooks/Applio
make run-install
make run-applio

Next time, you will only enter the last 3 commands.

Finally, the link to access the GUI will appear.

You can train models while checking Tensorboard, do inference, or use TTS.

Mark the Save Only Latest option before training to prevent it from filling up your storage.

Run tensorboard in another terminal, click on the terminal icon and enter the following commands:

cd /notebooks/Applio
make run-tensorboard

Click on folder icon and locate your trained model in the Applio/logs/model folder, and the .pth files are in the Applio/logs/zips folder.

How to upload my dataset in Paperspace?

Upload your audio in .wav format using the Dataset Maker or click on folder icon and setup it manually to Applio/assets/datasets creating inside a folder for the program to read it.

How to resume training in Paperspace?

If the model still needs training, simply do the following:

  • Entering the last 3 commands from step 4.

  • Then, in the Applio interface, input your model name, use the same sample rate, and proceed to the last part of the train tab. Set the same batch size, pretrained (if you used) and increase the number of epochs you want to train.