From cd8919e65c966112ac6596155ba60e2a3a0bc2fa Mon Sep 17 00:00:00 2001 From: mrq Date: Sat, 18 Feb 2023 19:46:26 +0000 Subject: [PATCH] fix sloppy copy paste job when looking for new models --- src/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils.py b/src/utils.py index ab5d7d6..0274589 100755 --- a/src/utils.py +++ b/src/utils.py @@ -265,8 +265,6 @@ def generate( keys = sorted(list(idx_cache.keys())) idx = keys[-1] + 1 - # I know there's something to pad I don't care - idx = pad(idx, 4) def get_name(line=0, candidate=0, combined=False): @@ -724,7 +722,7 @@ def get_voice_list(dir=get_voice_dir()): def get_autoregressive_models(dir="./models/finetunes/"): os.makedirs(dir, exist_ok=True) - return [get_model_path('autoregressive.pth')] + sorted([d for d in os.listdir(dir) if os.path.isdir(os.path.join(dir, d)) and len(os.listdir(os.path.join(dir, d))) > 0 ]) + return [get_model_path('autoregressive.pth')] + sorted([f'{dir}/{d}' for d in os.listdir(dir) if d[-4:] == ".pth" ]) def get_dataset_list(dir="./training/"): return sorted([d for d in os.listdir(dir) if os.path.isdir(os.path.join(dir, d)) and len(os.listdir(os.path.join(dir, d))) > 0 and "train.txt" in os.listdir(os.path.join(dir, d)) ])