From 2104dbdbc5962230e194bd1de696acb5b273521b Mon Sep 17 00:00:00 2001 From: mrq Date: Fri, 24 Feb 2023 13:05:08 +0000 Subject: [PATCH] ops --- src/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils.py b/src/utils.py index 162361e..586020c 100755 --- a/src/utils.py +++ b/src/utils.py @@ -843,10 +843,10 @@ def get_autoregressive_models(dir="./models/finetunes/"): for training in os.listdir(f'./training/'): if not os.path.isdir(f'./training/{training}/') or not os.path.isdir(f'./training/{training}/models/'): continue - #found = found + sorted([ f'./training/{training}/model/{d}' for d in os.listdir(f'./training/{training}/models/') if d[-8:] == "_gpt.pth" ]) + #found = found + sorted([ f'./training/{training}/models/{d}' for d in os.listdir(f'./training/{training}/models/') if d[-8:] == "_gpt.pth" ]) models = sorted([ int(d[:-8]) for d in os.listdir(f'./training/{training}/models/') if d[-8:] == "_gpt.pth" ]) - found = found + [ f'./training/{training}/model/{d}_gpt.pth' for d in models ] - #found.append(f'./training/{training}/model/{models[-1]}_gpt.pth') + found = found + [ f'./training/{training}/models/{d}_gpt.pth' for d in models ] + #found.append(f'./training/{training}/models/{models[-1]}_gpt.pth') return base + additionals + found @@ -1182,6 +1182,7 @@ def reload_tts( model=None ): def update_autoregressive_model(autoregressive_model_path): if not autoregressive_model_path or not os.path.exists(autoregressive_model_path): + print(f"Invalid model: {autoregressive_model_path}") return args.autoregressive_model = autoregressive_model_path