diff options
author | hlky <106811348+hlky@users.noreply.github.com> | 2022-08-24 11:44:48 +0000 |
---|---|---|
committer | hlky <106811348+hlky@users.noreply.github.com> | 2022-08-24 11:44:48 +0000 |
commit | 29d0d65504bca16e118a36ea355e7951ec12c11f (patch) | |
tree | 3a1a8c0fab3063034171b11c74bd5c040be9c0b8 /webui.py | |
parent | 852baf422ad86e406e0fa999c2f340bfd6a272d2 (diff) | |
download | stable-diffusion-webui-gfx803-29d0d65504bca16e118a36ea355e7951ec12c11f.tar.gz stable-diffusion-webui-gfx803-29d0d65504bca16e118a36ea355e7951ec12c11f.tar.bz2 stable-diffusion-webui-gfx803-29d0d65504bca16e118a36ea355e7951ec12c11f.zip |
jpg grid, named grid
Grid file named with seed and prompt, output as jpg
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -401,7 +401,8 @@ def process_images(outpath, func_init, func_sample, prompt, seed, sampler_name, output_images.insert(0, grid)
- grid.save(os.path.join(outpath, f'grid-{grid_count:04}.png'))
+ grid_file = f"grid-{grid_count:05}-{seed}_{prompts[i].replace(' ', '_').translate({ord(x): '' for x in invalid_filename_chars})[:128]}.jpg"
+ grid.save(os.path.join(outpath, grid_file), 'jpeg', quality=80, optimize=True)
grid_count += 1
info = f"""
|