Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
added Applio No UI and minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LightSpark55 committed May 13, 2024
1 parent 5baac47 commit 9d8b53a
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 30 deletions.
2 changes: 1 addition & 1 deletion FAQ/General/Info.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Common questions and information about RVC/Applio in general
Link: [Training and Inference without WebUI](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/myinfer-v2-0528.py)
==-
==- **How to share a model/How to use others models?**
Share the pth file in the weights folder, not the one in logs. Future versions will use a zip file. Do not copy large pth files; use the ckpt tab to extract a smaller model for sharing. Compress it into a zip and upload it to Drive or Huggingface if you want to publish your model in Ai Hispano, go to the :envelope_with_arrow:`publish-a-model` section and execute the /model command and fill in the corresponding data of your model
Share the pth file in the zips folder, not the one in logs. Do not copy large pth files; use the ckpt tab to extract a smaller model for sharing. Compress it into a zip and upload it to Drive or Hugging Face if you want to publish your model in Ai Hispano, go to the :envelope_with_arrow:`publish-a-model` section and execute the /model command and fill in the corresponding data of your model
==-
==- **Test previous model and continue Training**
### - How can I use the saved model in the middle of training?
Expand Down
140 changes: 125 additions & 15 deletions Get-Started/Alternatives.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ icon: cloud

Thanks to our team, we were able to bring Applio to other places for your convenience

+++ Google Colab
+++ Google Colab UI

## What is Google Colab?

Google Colab **(Google Colaboratory)** is a free cloud based platform that enables writing and executing Python code within an interactive notebook environment. It provides free access to computing resources, including CPUs, **GPUs** and TPUs from Google’s servers, making it particularly useful for machine learning tasks and data analysis. Additionally, Colab offers a Pro subscription, but it’s not highly recommended to pay for it when there are better alternatives available.
Google Colab **(Google Colaboratory)** is a free cloud based platform that enables writing and executing Python code within an interactive notebook environment. It provides free access to computing resources, including CPUs, **GPUs** and TPUs from Google’s servers, making it particularly useful for machine learning tasks and data analysis. Additionally, Colab offers a Pro subscription, but it’s not highly recommended to pay for it when there are better alternatives available. Some Colabs have an **interface (UI)** through Gradio, providing a simple and user-friendly experience for users, however, these interfaces are not allowed by Google Colab, so there is a possibility of jeopardizing your google account.

!!!warning Warning
It should be noted that Gradio is banned from Colab, so it is preferable to use a secondary or new account to avoid a possible ban. Additionally, it is possible that Colab may disconnect after a few hours due to Google’s limitations.
Please note noted that Gradio is banned from Colab, so it is preferable to use a secondary, a new account or [Applio No UI Colab](https://colab.research.google.com/github/iahispano/applio/blob/master/assets/Applio_NoUI.ipynb) to avoid a possible ban. Additionally, it is possible that Colab may disconnect after a few hours due to Google’s limitations.
!!!

1. Enter [Applio Colab](https://colab.research.google.com/github/iahispano/applio/blob/master/assets/Applio.ipynb) and just **run the 2 cells**.
Expand All @@ -24,10 +24,7 @@ It should be noted that Gradio is banned from Colab, so it is preferable to use

![](../assets/tunel.png)

!!!info In case you want to **train**, you should run the **Extra cells** before run **Start Applio** cell. Otherwise, simply run the **Install Applio** and **Start Applio** cells.
!!!

### Extra cells
### Extra cells (only for training)

In this section, you will find the following options:

Expand All @@ -39,8 +36,10 @@ In this section, you will find the following options:
![](../assets/Extra-Colab.png)

3. You can [train](../get-started/training.md/) models while checking [Tensorboard](../get-started/tensorboard.md), do [inference](../get-started/inferencing.md/), or use [TTS](../get-started/tts.md/)
!!!info In case you want to **train**, you should run the **Extra cells** before run **Start Applio** cell. Otherwise, simply run the **Install Applio** and **Start Applio** cells.
!!!

### 4. How to upload my dataset in Colab?
### How to upload my dataset in Colab?

To load your dataset in Colab, there are two ways to do it:

Expand All @@ -51,7 +50,7 @@ To load your dataset in Colab, there are two ways to do it:
!!!info Mark the **Save Only Latest** option before training to prevent it from filling up your Colab storage.
!!!

### 5. How to export my model to my Google Drive?
### How to export my model to my Google Drive?

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

Expand All @@ -61,7 +60,13 @@ To save your model, there are three ways to do it:

- **Manual (NOT RECOMENDED):** click on :file_folder: 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.

(If you want to retrain place the name of your model in the **Load a Backup** cell and run it. Then, insert the name of your model and enter a higher number of epochs)
### 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](https://docs.applio.org/faq/rvc/#batch-size)**, **[pretrained](https://docs.applio.org/get-started/pretrained/#how-to-use-pretraineds) (if you used)** and increase the number of epochs you want to train.

### Code to be afk

Expand All @@ -81,16 +86,114 @@ function ClickConnect() {
}
setInterval(ClickConnect, 6000);
```
+++ Google Colab No UI

## What is Google Colab?

Google Colab **(Google Colaboratory)** is a free cloud based platform that enables writing and executing Python code within an interactive notebook environment. Some Colabs do not use **interfaces (No UI)** because their use is banned in Google Colab, which means that the entire process is done directly from the notebook using cells, making it challenging for some users.

- Enter [Applio No UI Colab](https://colab.research.google.com/github/iahispano/applio/blob/master/assets/Applio_NoUI.ipynb) and run the **Installation** cell.

### How to [infer](https://docs.applio.org/faq/rvc/#inference) in Google Colab No UI?

1. First, you’ll need to upload the audio you want to use to your Google Drive. Make sure the audio name don't contain spaces or special characters.

2. Place the **Google Drive or Hugging Face** model link in the **model_link** and run the **Download model** cell.

3. Click on :file_folder: in Colab, then navigate to your audio, copy the path, it should look like this: `/content/drive/MyDrive/audio name.wav` and paste it into the **input_path**. Finally run the **Run inference** cell.
==- **Advanced Settings**
- **Export_format:** Select the format to export the audio.
- **F0method:** Select between [rvmpe, crepe or other](https://docs.applio.org/faq/rvc/#f0-extraction-methods)
- **f0up_key:** Adjust the tone of the model, for male it is - and female it is +. For male to female is -12 and female to male is +12.
- **Filter_radius:** Applies respiration filtering to the results, the value represents the filter radius and respiration reduction to avoid artifacts.
- **Rms_mix_rate:** Substitute or blend with the volume envelope of the output.
- **Protect:** Safeguard distinct consonants and breathing sounds to prevent electro-acoustic tearing and other artifacts.
- **Index_rate:** It is the one in charge of controlling the index, the larger the ratio, the more single the dataset but it can result in artifacts, so it is better to leave it as it is by default.
- **Hop_length:** Denotes the duration it takes for the system to transition to a significant pitch change. Smaller hop lengths require more time for inference and training but tend to yield higher pitch accuracy.
- **Clean_strenght:** The more you increase it the more it will clean up, but it will be more compressed.
- **Split_audio:** Basically cuts the audio into parts to make the inference by parts and then joins them together.
- **Clean_audio:** Clean your audio output using noise detection algorithms, recommended for speaking audios.
- **Autotune:** Apply a soft autotune to your inferences, recommended for singing conversions.
==-

### How to train in Google Colab No UI?

1. Place your audio in a folder on your Google Drive and click on :file_folder: in Colab, then navigate to your dataset folder, copy the path, it should look like this `/content/drive/MyDrive/dataset name folder` and paste it into the **dataset_path**, make sure the audio and folder name don't contain spaces or special characters. Also, specify the [**sample rate**](https://docs.applio.org/guides/datasets/sample-rate/) and run the **Preprocess Dataset** cell.

2. Next, in the **Extract Features** section, set the [**f0method**](https://docs.applio.org/faq/rvc/#f0-extraction-methods) and **hop_length**, and run that cell.

3. Afterward, run the **Generate [index](https://docs.applio.org/faq/rvc/#added-index) file** cell.

4. In the **Train** section, before run that cell you should set the following:

- **Total_epoch:** The number of epochs needed varies based on your dataset. Monitor progress using TensorBoard; typically, models perform well around 200-400 epochs.

- [**Batch_size:**](https://docs.applio.org/faq/rvc/#batch-size) Adjust the batch size according to your preference; a batch size of 8 is mostly recommended.

- **Save_every_epoch:** Set this value between 10 and 50 to determine how often the model's state is saved during training.
==- **Other Options**
- **Pitch_guidance:** Gives variation of pitch.
- **auto_backups (recomended):** Keep this checked it if you want to save a copy of your model in your Google Drive after training completes.
- [Pretrained:](https://docs.applio.org/faq/rvc/#pretrained) Uses the [RVC](https://docs.applio.org/faq/rvc/#what-is-rvc) pretrained.
- **tensorboard:** Keep this checked; it will determine if the model is overfitting.
- **Save Only Latest:** Save a single D/G file with information.
- **Save Every Weights:** Save the weights of the model when a cycle of 'Save Every Epoch' is completed.
- **overtraining_detector:** Mark it only if you will train for more than 200 epochs.
- **overtraining_threshold:** Set the maximum number of epochs you want your model to stop training if no improvement is detected.
- [Custom_pretrained:](/get-started/pretrained.md) Keep this checked if you want to use the Custom Pretrained that are loaded.
==-
- [don't know how to use Tensorboard for correct training? Check out the Tensorboard section](/get-started/tensorboard.md)

5. Finally your trained model will be located in your Google Drive within the **RVC_Backup folder**.

### How to use custom pretrained in Goggle Colab No UI?

- Download the [pretrained](https://docs.applio.org/get-started/pretrained/#where-to-find-pretraineds) you want to use and upload the d.pth and g.pth files to your Google Drive.

- Click on :file_folder: 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.

+++ Huggingface
- 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](https://docs.applio.org/guides/datasets/sample-rate/#what-is-sample-rate) of the custom pretraineds.

## What is Huggingface?

### How to resume training in Google Colab No UI?

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

- Run the **Installation** cell as before, but now you’ll need to enter your **model name** in **Load a backup** cell and run it.

- Then, in the **Set training variables** cell, input your **model_name**, use the same **sample_rate** and **hop_length** amd run it.

- Finally in the **Train** set the same **[batch size](https://docs.applio.org/faq/rvc/#batch-size)**, **[custom_pretrained](https://docs.applio.org/get-started/pretrained/#how-to-use-pretraineds) (if you used)**, increase the number of **total_epoch** you want to train and other seetting that you used before and run that cell.

### Code to be afk

To run this code in Colab, we have to 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.

```js
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);
```
+++ Hugging Face

## What is Hugging Face?

Hugging Face is a company specialized in artificial intelligence that has distinguished itself through its work in developing tools and models for **natural language processing (NLP)**. This has made it one of the leading online communities and platforms for cutting edge NLP model research, development and distribution.

1. First you need to create a huggingface account.
1. First you need to create a hugging Face account.

2. Then enter [Applio Huggingface Space](https://huggingface.co/spaces/IAHispano/Applio) and duplicate the space, that is all. If you don't want to use huggingface you can use [Applo playground](https://applio.org/playground).
2. Then enter [Applio Hugging Face Space](https://huggingface.co/spaces/IAHispano/Applio) and duplicate the space, that is all. If you don't want to use hugging Face you can use [Applo playground](https://applio.org/playground).

![](../assets/Duplicate.png)

Expand Down Expand Up @@ -152,7 +255,14 @@ make run-tensorboard

8. Click on :file_folder: and locate your trained model in the `Applio/logs/model` folder, and the .pth files are in the `Applio/logs/zips` folder.

- (If you want to retrain insert the name of your model and enter a higher number of epochs)
### 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](https://docs.applio.org/faq/rvc/#batch-size)**, **[pretrained](https://docs.applio.org/get-started/pretrained/#how-to-use-pretraineds) (if you used)** and increase the number of epochs you want to train.

!!!warning Warning
Make sure to set the [batch size](https://docs.applio.org/faq/rvc/#batch-size) according to the VRAM of your chosen GPU.
!!!
Expand Down
4 changes: 3 additions & 1 deletion Get-Started/Inferencing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ order: B
![**Manual loading alternative:** unzip the downloaded .zip file and **drag the two files into the Drop files box**. Now you can search for models from Applio by simply entering the character name to search in the **Search Model** section, then copy the model link or download it.](/assets/Download-Models.png)

!!!warning
Applio can only download models from Google Drive, Huggingface, [Applio Web](https://applio.org/models), Discord, Yandex, Pixeldrain and Mediafire. Downloading files from mega may fail!, this is due to malfunction of the dependency.
Applio can only download models from Google Drive, Hugging Face, [Applio Web](https://applio.org/models), Discord, Yandex, Pixeldrain and Mediafire. Downloading files from mega may fail!, this is due to malfunction of the dependency.
!!!

---
Expand Down Expand Up @@ -39,6 +39,7 @@ Applio can only download models from Google Drive, Huggingface, [Applio Web](htt
- **Split Audio:** Basically cuts the audio into parts to make the inference by parts and then joins them together.
- **Autotune:** Apply a soft autotune to your inferences, recommended for singing conversions.
- **Clean Audio:** Clean your audio output using noise detection algorithms, recommended for speaking audios.
- **Upscale Audio:** Upscale the audio to a higher quality, recommended for low-quality audios.
- **Clean Strenght:** The more you increase it the more it will clean up, but it will be more compressed.
- **Pitch:** Adjust the tone of the model, for male it is - and female it is +. For male to female is -12 and female to male is +12.
- **Filter Radius:** Applies respiration filtering to the results, the value represents the filter radius and respiration reduction to avoid artifacts.
Expand All @@ -47,6 +48,7 @@ Applio can only download models from Google Drive, Huggingface, [Applio Web](htt
- **Protec Voiceless Consonants:** Safeguard distinct consonants and breathing sounds to prevent electro-acoustic tearing and other artifacts.
- **Hop Length:** Denotes the duration it takes for the system to transition to a significant pitch change. Smaller hop lengths require more time for inference and training but tend to yield higher pitch accuracy.
- **Pitch extraction algorithm:** Select between [rvmpe, crepe or other](https://docs.applio.org/faq/rvc/#f0-extraction-methods)
- **(optional) Embedder Model:** select the Embedder model (hubert or contentvec).
==-

!!!primary What should I do if my output audio sounds [robotic](https://docs.applio.org/faq/rvc/#artifacting)?
Expand Down
Loading

0 comments on commit 9d8b53a

Please sign in to comment.