aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postprocessing.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-04-29 19:23:21 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-04-29 19:23:21 +0000
commite23063610f4695ce12f963e06e78154f5ce128d1 (patch)
treeeeab6971022d4ee0e1bfd6a8b603b0e950a6c868 /modules/postprocessing.py
parent22bcc7be428c94e9408f589966c2040187245d81 (diff)
parentcd7f2b19f45a28c8eeb88994c8972c61c8a3c63d (diff)
downloadstable-diffusion-webui-gfx803-e23063610f4695ce12f963e06e78154f5ce128d1.tar.gz
stable-diffusion-webui-gfx803-e23063610f4695ce12f963e06e78154f5ce128d1.tar.bz2
stable-diffusion-webui-gfx803-e23063610f4695ce12f963e06e78154f5ce128d1.zip
Merge branch 'dev' into release_candidate
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 09d8e605..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)
+ 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'