aboutsummaryrefslogtreecommitdiff
path: root/modules/postprocessing.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-04-29 17:02:14 +0300
committerGitHub <noreply@github.com>2023-04-29 17:02:14 +0300
commit3894609b52cb21d8974387bf6bb4b734e3296b4a (patch)
treec17a740c559e6dfc7d86dcfad07675522d315037 /modules/postprocessing.py
parent9a4e650800adc444c07a48572a958a71c2144c15 (diff)
parent17cce456133bf22c83cb379c0179e8b0daaa21e4 (diff)
Merge branch 'dev' into master
Diffstat (limited to 'modules/postprocessing.py')
-rw-r--r--modules/postprocessing.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/postprocessing.py b/modules/postprocessing.py
index 63b9caf8..736315e2 100644
--- a/modules/postprocessing.py
+++ b/modules/postprocessing.py
@@ -18,9 +18,14 @@ 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.name)
+ 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'