1
0

only include auto in the list of models under setting, nothing else

This commit is contained in:
mrq 2023-03-29 19:53:23 +00:00
parent f66281f10c
commit 9b01377667
2 changed files with 7 additions and 3 deletions

View File

@ -2087,7 +2087,7 @@ def get_voice_list(dir=get_voice_dir(), append_defaults=False):
return res
def get_autoregressive_models(dir="./models/finetunes/", prefixed=False):
def get_autoregressive_models(dir="./models/finetunes/", prefixed=False, auto=False):
os.makedirs(dir, exist_ok=True)
base = [get_model_path('autoregressive.pth')]
halfp = get_halfp_model_path()
@ -2112,7 +2112,11 @@ def get_autoregressive_models(dir="./models/finetunes/", prefixed=False):
res[i] = f'[{shorthash}] {path}'
return ["auto"] + relative_paths(res)
paths = relative_paths(res)
if auto:
paths = ["auto"] + paths
return paths
def get_diffusion_models(dir="./models/finetunes/", prefixed=False):
return relative_paths([ get_model_path('diffusion_decoder.pth') ])

View File

@ -610,7 +610,7 @@ def setup_gradio():
with gr.Column():
# EXEC_SETTINGS['tts_backend'] = gr.Dropdown(TTSES, label="TTS Backend", value=args.tts_backend if args.tts_backend else TTSES[0])
EXEC_SETTINGS['autoregressive_model'] = gr.Dropdown(choices=autoregressive_models, label="Autoregressive Model", value=args.autoregressive_model if args.autoregressive_model else autoregressive_models[0])
EXEC_SETTINGS['autoregressive_model'] = gr.Dropdown(choices=["auto"] + autoregressive_models, label="Autoregressive Model", value=args.autoregressive_model if args.autoregressive_model else "auto")
EXEC_SETTINGS['diffusion_model'] = gr.Dropdown(choices=diffusion_models, label="Diffusion Model", value=args.diffusion_model if args.diffusion_model else diffusion_models[0])
EXEC_SETTINGS['vocoder_model'] = gr.Dropdown(VOCODERS, label="Vocoder", value=args.vocoder_model if args.vocoder_model else VOCODERS[-1])
EXEC_SETTINGS['tokenizer_json'] = gr.Dropdown(tokenizer_jsons, label="Tokenizer JSON Path", value=args.tokenizer_json if args.tokenizer_json else tokenizer_jsons[0])