favor existing arguments from parameters (kwargs) over global (args)
This commit is contained in:
parent
5d73d9e71c
commit
89102347a9
|
@ -1015,7 +1015,7 @@ def generate_tortoise(**kwargs):
|
|||
'cond_free_k': float(parameters['cond_free_k']),
|
||||
|
||||
'num_autoregressive_samples': parameters['num_autoregressive_samples'],
|
||||
'sample_batch_size': args.sample_batch_size,
|
||||
'sample_batch_size': parameters['sample_batch_size'] if parameters.get('sample_batch_size') else args.sample_batch_size,
|
||||
'diffusion_iterations': parameters['diffusion_iterations'],
|
||||
|
||||
'voice_samples': None,
|
||||
|
@ -1030,9 +1030,9 @@ def generate_tortoise(**kwargs):
|
|||
'cond_free': "Conditioning-Free" in parameters['experimentals'],
|
||||
'cvvp_amount': parameters['cvvp_weight'],
|
||||
|
||||
'autoregressive_model': args.autoregressive_model,
|
||||
'diffusion_model': args.diffusion_model,
|
||||
'tokenizer_json': args.tokenizer_json,
|
||||
'autoregressive_model': parameters['autoregressive_model'] if parameters.get('autoregressive_model') else args.autoregressive_model,
|
||||
'diffusion_model': parameters['diffusion_model'] if parameters.get('diffusion_model') else args.diffusion_model,
|
||||
'tokenizer_json': parameters['tokenizer_json'] if parameters.get('tokenizer_json') else args.tokenizer_json,
|
||||
}
|
||||
|
||||
# could be better to just do a ternary on everything above, but i am not a professional
|
||||
|
@ -1046,6 +1046,7 @@ def generate_tortoise(**kwargs):
|
|||
continue
|
||||
settings[k] = override[k]
|
||||
|
||||
|
||||
if settings['autoregressive_model'] is not None:
|
||||
if settings['autoregressive_model'] == "auto":
|
||||
settings['autoregressive_model'] = deduce_autoregressive_model(selected_voice)
|
||||
|
|
Loading…
Reference in New Issue
Block a user