aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postprocessing.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-04-29 10:10:46 +0000
committerGitHub <noreply@github.com>2023-04-29 10:10:46 +0000
commit87535fcf292af8890520e7f346df0f41dd74353a (patch)
tree89c7f9ac26ae637f22f2db1efe69fb4aa51e9c70 /modules/postprocessing.py
parent02e351880796422eac3bbaf7aa86332b588651ce (diff)
parent1ffb44b0b2c9cb5fb379274515772741a9c1dbaf (diff)
downloadstable-diffusion-webui-gfx803-87535fcf292af8890520e7f346df0f41dd74353a.tar.gz
stable-diffusion-webui-gfx803-87535fcf292af8890520e7f346df0f41dd74353a.tar.bz2
stable-diffusion-webui-gfx803-87535fcf292af8890520e7f346df0f41dd74353a.zip
Merge branch 'dev' into Branch_AddNewFilenameGen
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'