diff options
Diffstat (limited to 'live-mogrify.py')
| -rw-r--r-- | live-mogrify.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/live-mogrify.py b/live-mogrify.py index 4e535e3..85a9ee2 100644 --- a/live-mogrify.py +++ b/live-mogrify.py @@ -127,12 +127,12 @@ def process_image(opt, data_opt, im): def list_checkpoints(): print("> list checkpoints") - return glob.glob('./checkpoints/*/latest_net_G*') + return sorted([f.split('/')[2] for f in glob.glob('./checkpoints/*/latest_net_G.pth')]) def list_checkpoint_dir(path): print("> list checkpoint path {}".format(path)) - if not os.path.exists('./checkpoints/' + path): + if not os.path.exists(os.path.join('./checkpoints/', path)): return "not found" - return glob.glob(os.path.join('./checkpoints/' + path + '/*_net_G.pth')) + return sorted([f.split('/')[3].replace('_net_G.pth','') for f in glob.glob('./checkpoints/' + path + '/*_net_G.pth')]) def list_datasets(): print("> list datasets") # return glob.glob('./checkpoints/*/latest_net_G*') |
