forked from camenduru/ai-voice-cloning
fixed last generation settings not actually load because brain worms
This commit is contained in:
parent
9594a960b0
commit
9238df0b03
|
@ -1802,7 +1802,10 @@ def save_args_settings():
|
|||
f.write(json.dumps(settings, indent='\t') )
|
||||
|
||||
# super kludgy )`;
|
||||
def import_generate_settings(file="./config/generate.json"):
|
||||
def import_generate_settings(file = None):
|
||||
if not file:
|
||||
file = "./config/generate.json"
|
||||
|
||||
res = {
|
||||
'text': None,
|
||||
'delimiter': None,
|
||||
|
@ -1828,8 +1831,10 @@ def import_generate_settings(file="./config/generate.json"):
|
|||
}
|
||||
|
||||
settings, _ = read_generate_settings(file, read_latents=False)
|
||||
|
||||
if settings is not None:
|
||||
res.update(settings)
|
||||
|
||||
return res
|
||||
|
||||
def reset_generation_settings():
|
||||
|
|
|
@ -791,10 +791,8 @@ def setup_gradio():
|
|||
outputs=training_configuration_output #console_output
|
||||
)
|
||||
|
||||
#care: this overrides all the above specified default values
|
||||
#specifically default voice not being null and empty prompt causing errors
|
||||
#if os.path.isfile('./config/generate.json'):
|
||||
# ui.load(import_generate_settings_proxy, inputs=None, outputs=generate_settings)
|
||||
if os.path.isfile('./config/generate.json'):
|
||||
ui.load(import_generate_settings_proxy, inputs=None, outputs=generate_settings)
|
||||
|
||||
if args.check_for_updates:
|
||||
ui.load(check_for_updates)
|
||||
|
|
Loading…
Reference in New Issue
Block a user