summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--live-mogrify.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/live-mogrify.py b/live-mogrify.py
index 43c1fc1..ec5c904 100644
--- a/live-mogrify.py
+++ b/live-mogrify.py
@@ -129,8 +129,8 @@ def list_checkpoints():
print("> list checkpoints")
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))
+def list_epochs(path):
+ print("> list epochs for {}".format(path))
if not os.path.exists(os.path.join('./checkpoints/', path)):
return "not found"
return sorted([f.split('/')[3].replace('_net_G.pth','') for f in glob.glob('./checkpoints/' + path + '/*_net_G.pth')])
@@ -145,6 +145,7 @@ def list_sequences():
'name': path,
'count': count,
})
+ return results
class Listener():
def __init__(self):
@@ -176,8 +177,8 @@ class Listener():
print("got command {}".format(cmd))
if cmd == 'list_checkpoints':
return list_checkpoints()
- if cmd == 'list_checkpoint_dir':
- return list_checkpoint_dir(payload)
+ if cmd == 'list_epochs':
+ return list_epochs(payload)
if cmd == 'list_sequences':
return list_sequences()
if cmd == 'play' and self.data_opt.processing is False: