diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-04-29 14:22:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 14:22:24 +0000 |
commit | 78d0ee3bbaa2b48b7918e8088ad91c34f1ff2f1e (patch) | |
tree | ef6f32229611cab72bc1cfe088e2c60a70dbf41a /modules/postprocessing.py | |
parent | 3ccf6f5ae8e57233200f9cac52da8d5d88ecee93 (diff) | |
parent | c018eefe9173ae8f3669340479569dda78643a8a (diff) | |
download | stable-diffusion-webui-gfx803-78d0ee3bbaa2b48b7918e8088ad91c34f1ff2f1e.tar.gz stable-diffusion-webui-gfx803-78d0ee3bbaa2b48b7918e8088ad91c34f1ff2f1e.tar.bz2 stable-diffusion-webui-gfx803-78d0ee3bbaa2b48b7918e8088ad91c34f1ff2f1e.zip |
Merge branch 'dev' into extension-settings-backup
Diffstat (limited to 'modules/postprocessing.py')
-rw-r--r-- | modules/postprocessing.py | 9 |
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'
|