diff --git a/assets/i18n/languages/en_US.json b/assets/i18n/languages/en_US.json index 735e47a6..e55259ca 100644 --- a/assets/i18n/languages/en_US.json +++ b/assets/i18n/languages/en_US.json @@ -17,6 +17,10 @@ "Model Name": "Model Name", "Enter model name": "Enter model name", "Dataset Path": "Dataset Path", + "Dataset Creator": "Dataset Creator", + "Dataset Name": "Dataset Name", + "Enter dataset name": "Enter dataset name", + "Upload Audio Dataset": "Upload Audio Dataset", "The audio file has been successfully added to the dataset. Please click the preprocess button.": "The audio file has been successfully added to the dataset. Please click the preprocess button.", "Enter dataset path": "Enter dataset path", "Sampling Rate": "Sampling Rate", diff --git a/assets/i18n/languages/es_ES.json b/assets/i18n/languages/es_ES.json index 1c886127..66ca2737 100644 --- a/assets/i18n/languages/es_ES.json +++ b/assets/i18n/languages/es_ES.json @@ -15,6 +15,10 @@ "Model Name": "Nombre del modelo", "Enter model name": "Introduzca el nombre del modelo", "Dataset Path": "Ruta del dataset", + "Dataset Creator": "Creador de datasets", + "Dataset Name": "Nombre del dataset", + "Enter dataset name": "Introduce el nombre de tu dataset", + "Upload Audio Dataset": "Sube el audio del dataset", "Enter dataset path": "Introduzca la ruta del dataset", "Sampling Rate": "Frecuencia de muestreo", "RVC Version": "VersiĆ³n RVC", diff --git a/core.py b/core.py index 7acc25ab..bb912a85 100644 --- a/core.py +++ b/core.py @@ -227,12 +227,12 @@ def run_train_script( g_pretrained_path=None, d_pretrained_path=None, ): - f0 = 1 if pitch_guidance == "True" else 0 - latest = 1 if save_only_latest == "True" else 0 - save_every = 1 if save_every_weights == "True" else 0 + f0 = 1 if str(pitch_guidance) == "True" else 0 + latest = 1 if str(save_only_latest) == "True" else 0 + save_every = 1 if str(save_every_weights) == "True" else 0 - if pretrained == "True": - if custom_pretrained == "False": + if str(pretrained) == "True": + if str(custom_pretrained) == "False": pg, pd = pretrained_selector(f0)[rvc_version][sampling_rate] else: if g_pretrained_path is None or d_pretrained_path is None: @@ -246,25 +246,25 @@ def run_train_script( train_script_path = os.path.join("rvc", "train", "train.py") command = [ "python", - train_script_path, + str(train_script_path), "-se", str(save_every_epoch), "-te", str(total_epoch), "-pg", - pg, + str(pg), "-pd", - pd, + str(pd), "-sr", str(sampling_rate), "-bs", str(batch_size), "-g", - gpu, + str(gpu), "-e", os.path.join(logs_path, str(model_name)), "-v", - rvc_version, + str(rvc_version), "-l", str(latest), "-c", diff --git a/tabs/train/train.py b/tabs/train/train.py index af620afb..cb816a03 100644 --- a/tabs/train/train.py +++ b/tabs/train/train.py @@ -84,46 +84,6 @@ def refresh_datasets(): return {"choices": sorted(get_datasets_list()), "__type__": "update"} -# Train Temporal Fix -def run_train( - model_name, - rvc_version, - save_every_epoch, - save_only_latest, - save_every_weights, - total_epoch, - sampling_rate, - batch_size, - gpu, - pitch_guidance, - pretrained, - custom_pretrained, - g_pretrained_path, - d_pretrained_path, -): - core = os.path.join("core.py") - command = [ - "python", - core, - "train", - str(model_name), - str(rvc_version), - str(save_every_epoch), - str(save_only_latest), - str(save_every_weights), - str(total_epoch), - str(sampling_rate), - str(batch_size), - str(gpu), - str(pitch_guidance), - str(pretrained), - str(custom_pretrained), - str(g_pretrained_path), - str(d_pretrained_path), - ] - subprocess.run(command) - - # Drop Model def save_drop_model(dropbox): if ".pth" not in dropbox: @@ -170,7 +130,10 @@ def save_drop_dataset_audio(dropbox, dataset_name): "The audio file has been successfully added to the dataset. Please click the preprocess button." ) ) - return None, destination_path + dataset_path = os.path.dirname(destination_path) + relative_dataset_path = os.path.relpath(dataset_path, now_dir) + + return None, relative_dataset_path # Train Tab @@ -193,7 +156,7 @@ def train_tab(): ) refresh_datasets_button = gr.Button(i18n("Refresh Datasets")) dataset_creator = gr.Checkbox( - label=i18n("Dataset Advanced Settings"), + label=i18n("Dataset Creator"), value=False, interactive=True, visible=True, @@ -357,7 +320,7 @@ def train_tab(): with gr.Row(): train_button = gr.Button(i18n("Start Training")) train_button.click( - run_train, + run_train_script, [ model_name, rvc_version,