summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-11 14:58:28 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-11 14:58:28 +0100
commitfd54efeb90fe23e7fd2694f0785ce7784103676b (patch)
tree64e474ef145792cd343bb45bd16e438b7e4a7db5
parent5af3ee2b900f17b329c641c8c07e54da86994408 (diff)
apths
-rw-r--r--cli/app/search/live.py2
-rw-r--r--cli/app/utils/cortex_utils.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/cli/app/search/live.py b/cli/app/search/live.py
index 06b679e..a1c1700 100644
--- a/cli/app/search/live.py
+++ b/cli/app/search/live.py
@@ -391,7 +391,7 @@ class Listener:
print("Step {}. Generation time: {:.2f}s".format(i, time.time() - gen_time))
out_img = vs.data2pil(gen_images[0])
if out_img is not None:
- out_img.save(os.path.join(path_out, "frame_{:5d}.png".format(i)), format='png')
+ out_img.save(os.path.join(path_out, "frame_{:05d}.png".format(i)), format='png')
img_to_send = out_img.resize((256, 256), Image.BICUBIC)
meta = {
'i': i,
diff --git a/cli/app/utils/cortex_utils.py b/cli/app/utils/cortex_utils.py
index fa84cf8..0a26330 100644
--- a/cli/app/utils/cortex_utils.py
+++ b/cli/app/utils/cortex_utils.py
@@ -99,6 +99,6 @@ def upload_file_to_cortex(opt_folder_id, fn, **kwargs):
"""Upload a file from disk"""
base_fn = os.path.basename(fn)
mimetype_tup = mimetypes.guess_type(base_fn)
- mimetype = "{}/{}".format(mimetype_tup)
+ mimetype = "{}/{}".format(mimetype_tup[0], mimetype_tup[1])
with open(fn, 'rb') as fp:
return upload_fp_to_cortex(opt_folder_id, (base_fn, fp, mimetype,), **kwargs)