Skip to content

Commit

Permalink
feat: 🎨 Updating the colab with respect to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Vidalnt committed Dec 22, 2024
1 parent e96a659 commit e327264
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions assets/Applio_NoUI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,14 @@
"sample_rate = \"40k\" # @param [\"32k\", \"40k\", \"48k\"] {allow-input: false}\n",
"sr = int(sample_rate.rstrip(\"k\")) * 1000\n",
"cpu_cores = 2 # @param {type:\"slider\", min:1, max:2, step:1}\n",
"cut_preprocess = True # @param{type:\"boolean\"}\n",
"cut_preprocess = \"Automatic\" # @param [\"Skip\", \"Simple\", \"Automatic\"] {allow-input: false}\n",
"process_effects = False # @param{type:\"boolean\"}\n",
"noise_reduction = False # @param{type:\"boolean\"}\n",
"noise_reduction_strength = 0.7 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n",
"chunk_len = 3.0 # @param {type:\"slider\", min:0.5, max:5.0, step:0.5}\n",
"overlap_len = 0.3 # @param {type:\"slider\", min:0.0, max:0.4, step:0.1}\n",
"\n",
"!python core.py preprocess --model_name \"{model_name}\" --dataset_path \"{dataset_path}\" --sample_rate \"{sr}\" --cpu_cores \"{cpu_cores}\" --cut_preprocess \"{cut_preprocess}\" --process_effects \"{process_effects}\" --noise_reduction \"{noise_reduction}\" --noise_reduction_strength \"{noise_reduction_strength}\""
"!python core.py preprocess --model_name \"{model_name}\" --dataset_path \"{dataset_path}\" --sample_rate \"{sr}\" --cpu_cores \"{cpu_cores}\" --cut_preprocess \"{cut_preprocess}\" --process_effects \"{process_effects}\" --noise_reduction \"{noise_reduction}\" --noise_reduction_strength \"{noise_reduction_strength}\" --chunk_len \"{chunk_len}\" --overlap_len \"{overlap_len}\""
]
},
{
Expand All @@ -453,10 +455,11 @@
"\n",
"sr = int(sample_rate.rstrip(\"k\")) * 1000\n",
"cpu_cores = 2 # @param {type:\"slider\", min:1, max:2, step:1}\n",
"include_mutes = 2 # @param {type:\"slider\", min:0, max:10, step:1}\n",
"embedder_model = \"contentvec\" # @param [\"contentvec\", \"chinese-hubert-base\", \"japanese-hubert-base\", \"korean-hubert-base\", \"custom\"] {allow-input: false}\n",
"embedder_model_custom = \"\" # @param {type:\"string\"}\n",
"\n",
"!python core.py extract --model_name \"{model_name}\" --rvc_version \"{rvc_version}\" --f0_method \"{f0_method}\" --hop_length \"{hop_length}\" --sample_rate \"{sr}\" --cpu_cores \"{cpu_cores}\" --gpu \"0\" --embedder_model \"{embedder_model}\" --embedder_model_custom \"{embedder_model_custom}\""
"!python core.py extract --model_name \"{model_name}\" --rvc_version \"{rvc_version}\" --f0_method \"{f0_method}\" --hop_length \"{hop_length}\" --sample_rate \"{sr}\" --cpu_cores \"{cpu_cores}\" --gpu \"0\" --embedder_model \"{embedder_model}\" --embedder_model_custom \"{embedder_model_custom}\" --include_mutes \"{include_mutes}\""
]
},
{
Expand Down Expand Up @@ -597,7 +600,7 @@
" print(\"Autobackup Disabled\")\n",
"else:\n",
" autobackups = True\n",
" print(\"Autobackup Enabled\") \n",
" print(\"Autobackup Enabled\")\n",
"# @markdown ### ⚙️ Train Settings\n",
"total_epoch = 800 # @param {type:\"integer\"}\n",
"batch_size = 15 # @param {type:\"slider\", min:1, max:25, step:0}\n",
Expand All @@ -618,6 +621,8 @@
"custom_pretrained = False # @param{type:\"boolean\"}\n",
"g_pretrained_path = \"/content/Applio/rvc/models/pretraineds/pretraineds_custom/G48k.pth\" # @param {type:\"string\"}\n",
"d_pretrained_path = \"/content/Applio/rvc/models/pretraineds/pretraineds_custom/D48k.pth\" # @param {type:\"string\"}\n",
"vocoder = \"HiFi-GAN\" # @param [\"HiFi-GAN\", \"MRF HiFi-GAN\", \"RefineGAN\"] {allow-input: false}\n",
"checkpointing = False # @param{type:\"boolean\"}\n",
"\n",
"if \"pretrained\" not in globals():\n",
" pretrained = True\n",
Expand All @@ -636,8 +641,7 @@
" if tensorboard == True:\n",
" %load_ext tensorboard\n",
" %tensorboard --logdir /content/Applio/logs/\n",
" !python core.py train --model_name \"{model_name}\" --rvc_version \"{rvc_version}\" --save_every_epoch \"{save_every_epoch}\" --save_only_latest \"{save_only_latest}\" --save_every_weights \"{save_every_weights}\" --total_epoch \"{total_epoch}\" --sample_rate \"{sr}\" --batch_size \"{batch_size}\" --gpu \"{gpu}\" --pretrained \"{pretrained}\" --custom_pretrained \"{custom_pretrained}\" --g_pretrained_path \"{g_pretrained_path}\" --d_pretrained_path \"{d_pretrained_path}\" --overtraining_detector \"{overtraining_detector}\" --overtraining_threshold \"{overtraining_threshold}\" --cleanup \"{cleanup}\" --cache_data_in_gpu \"{cache_data_in_gpu}\"\n",
"\n",
" !python core.py train --model_name \"{model_name}\" --rvc_version \"{rvc_version}\" --save_every_epoch \"{save_every_epoch}\" --save_only_latest \"{save_only_latest}\" --save_every_weights \"{save_every_weights}\" --total_epoch \"{total_epoch}\" --sample_rate \"{sr}\" --batch_size \"{batch_size}\" --gpu \"{gpu}\" --pretrained \"{pretrained}\" --custom_pretrained \"{custom_pretrained}\" --g_pretrained_path \"{g_pretrained_path}\" --d_pretrained_path \"{d_pretrained_path}\" --overtraining_detector \"{overtraining_detector}\" --overtraining_threshold \"{overtraining_threshold}\" --cleanup \"{cleanup}\" --cache_data_in_gpu \"{cache_data_in_gpu}\" --vocoder \"{vocoder}\" --checkpointing \"{checkpointing}\"\n",
"\n",
"server_thread = threading.Thread(target=start_train)\n",
"server_thread.start()\n",
Expand Down

0 comments on commit e327264

Please sign in to comment.