summaryrefslogtreecommitdiff
path: root/live-mogrify.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-21 16:10:18 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-21 16:10:18 +0200
commit59e8308622fd810e574422cdd274dd2e378696dd (patch)
tree0cb0ee68b81548d8c8c9c4cdcca26e31dccc65a0 /live-mogrify.py
parent22b39f521045e8bffb9dfc2efc782a4e81d4e87f (diff)
cmdz
Diffstat (limited to 'live-mogrify.py')
-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: