aboutsummaryrefslogtreecommitdiff
path: root/modules/postprocessing.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-04-29 14:09:45 +0300
committerGitHub <noreply@github.com>2023-04-29 14:09:45 +0300
commit967fb51df2cbe7ff6b8408c788c180b411e7f828 (patch)
tree696cd8e6a6f0991346194938c563eed340f003e5 /modules/postprocessing.py
parent9edd4b6e516ec327e15cc00a3933c681fc4b2f75 (diff)
parentfdac48683595699189aa84f8c1bea7b3bf718801 (diff)
Merge branch 'dev' into master
Diffstat (limited to 'modules/postprocessing.py')
-rw-r--r--modules/postprocessing.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/postprocessing.py b/modules/postprocessing.py
index 09d8e605..4dc1a2ab 100644
--- a/modules/postprocessing.py
+++ b/modules/postprocessing.py
@@ -18,9 +18,15 @@ def run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir,
if extras_mode == 1:
for img in image_folder:
- image = Image.open(img)
+ if isinstance(img, Image.Image):
+ image = img
+ fn = ''
+ else:
+ image = Image.open(os.path.abspath(img.name))
+ fn = os.path.splitext(img.orig_name)[0]
+
image_data.append(image)
- image_names.append(os.path.splitext(img.orig_name)[0])
+ image_names.append(fn)
elif extras_mode == 2:
assert not shared.cmd_opts.hide_ui_dir_config, '--hide-ui-dir-config option must be disabled'
assert input_dir, 'input directory not selected'