forked from mrq/ai-voice-cloning
forgot to save the simplified training input json first before touching any of the settings that dump to the yaml
This commit is contained in:
parent
221ac38b32
commit
1b18b3e335
|
@ -1348,6 +1348,10 @@ def save_training_settings( **kwargs ):
|
|||
settings = {}
|
||||
settings.update(kwargs)
|
||||
|
||||
outjson = f'./training/{settings["voice"]}/train.json'
|
||||
with open(outjson, 'w', encoding="utf-8") as f:
|
||||
f.write(json.dumps(settings, indent='\t') )
|
||||
|
||||
settings['dataset_path'] = f"./training/{settings['voice']}/train.txt"
|
||||
settings['validation_path'] = f"./training/{settings['voice']}/validation.txt"
|
||||
|
||||
|
@ -1428,9 +1432,6 @@ def save_training_settings( **kwargs ):
|
|||
if settings['dataset_path'] == settings['validation_path'] or not os.path.exists(settings['validation_path']):
|
||||
settings['validation_enabled'] = 'false'
|
||||
"""
|
||||
outjson = f'./training/{settings["voice"]}/train.json'
|
||||
with open(outjson, 'w', encoding="utf-8") as f:
|
||||
f.write(json.dumps(settings, indent='\t') )
|
||||
|
||||
if settings['resume_state']:
|
||||
settings['source_model'] = f"# pretrain_model_gpt: {settings['source_model']}"
|
||||
|
|
|
@ -414,7 +414,7 @@ def setup_gradio():
|
|||
TRAINING_SETTINGS["gpus"] = gr.Number(label="GPUs", value=get_device_count(), precision=0)
|
||||
|
||||
TRAINING_SETTINGS["source_model"] = gr.Dropdown( choices=autoregressive_models, label="Source Model", type="value", value=autoregressive_models[0] )
|
||||
TRAINING_SETTINGS["resume_state"] = gr.Textbox(label="Resume State Path", placeholder="./training/${voice}/training_state/${last_state}.state")
|
||||
TRAINING_SETTINGS["resume_state"] = gr.Textbox(label="Resume State Path", placeholder="./training/${voice}/finetune/training_state/${last_state}.state")
|
||||
|
||||
TRAINING_SETTINGS["voice"] = gr.Dropdown( choices=dataset_list, label="Dataset", type="value", value=dataset_list[0] if len(dataset_list) else "" )
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user