diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-04-29 06:17:35 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-04-29 06:17:35 +0000 |
commit | 101a18fc8466577501b57eac6a4b5d07351c9ec6 (patch) | |
tree | 468875ffb7b0c673b31e2413aa7f614349342d19 /modules/postprocessing.py | |
parent | 22bcc7be428c94e9408f589966c2040187245d81 (diff) | |
download | stable-diffusion-webui-gfx803-101a18fc8466577501b57eac6a4b5d07351c9ec6.tar.gz stable-diffusion-webui-gfx803-101a18fc8466577501b57eac6a4b5d07351c9ec6.tar.bz2 stable-diffusion-webui-gfx803-101a18fc8466577501b57eac6a4b5d07351c9ec6.zip |
bump gradio to 3.27
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..ba5745b9 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):
+ fn = ''
+ else:
+ image = Image.open(img)
+ 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'
|