aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postprocessing.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-12-02 09:11:21 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2023-12-02 09:11:21 +0000
commit4a666381bf98333ba4512db0f0033df5f6a08771 (patch)
treea7046d79bbfef6a9f9963d059713f871b7275d11 /modules/postprocessing.py
parent0bb6e00ba3c6775b17b3449c454c6efabb1bdad1 (diff)
downloadstable-diffusion-webui-gfx803-4a666381bf98333ba4512db0f0033df5f6a08771.tar.gz
stable-diffusion-webui-gfx803-4a666381bf98333ba4512db0f0033df5f6a08771.tar.bz2
stable-diffusion-webui-gfx803-4a666381bf98333ba4512db0f0033df5f6a08771.zip
extras tab batch: actually use original filename
preprocessing upscale: do not do an extra upscale step if it's not needed
Diffstat (limited to 'modules/postprocessing.py')
-rw-r--r--modules/postprocessing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/postprocessing.py b/modules/postprocessing.py
index fd0c0cc9..0a134ee4 100644
--- a/modules/postprocessing.py
+++ b/modules/postprocessing.py
@@ -60,8 +60,10 @@ def run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir,
if opts.use_original_name_batch and name is not None:
basename = os.path.splitext(os.path.basename(name))[0]
+ forced_filename = basename
else:
basename = ''
+ forced_filename = None
infotext = ", ".join([k if k == v else f'{k}: {generation_parameters_copypaste.quote(v)}' for k, v in pp.info.items() if v is not None])
@@ -70,7 +72,7 @@ def run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir,
pp.image.info["postprocessing"] = infotext
if save_output:
- images.save_image(pp.image, path=outpath, basename=basename, seed=None, prompt=None, extension=opts.samples_format, info=infotext, short_filename=True, no_prompt=True, grid=False, pnginfo_section_name="extras", existing_info=existing_pnginfo, forced_filename=None)
+ images.save_image(pp.image, path=outpath, basename=basename, extension=opts.samples_format, info=infotext, short_filename=True, no_prompt=True, grid=False, pnginfo_section_name="extras", existing_info=existing_pnginfo, forced_filename=forced_filename)
if extras_mode != 2 or show_extras_results:
outputs.append(pp.image)