aboutsummaryrefslogtreecommitdiffstats
path: root/modules/processing.py
diff options
context:
space:
mode:
authorgk <gkpyon@gmail.com>2023-04-07 12:04:46 +0000
committergk <gkpyon@gmail.com>2023-04-07 12:04:46 +0000
commitd609f6030ec464b371a899ced366c62bbd9a4a91 (patch)
tree9a99f07d6951c5d112b82772328f7d0bc1b6256a /modules/processing.py
parent22bcc7be428c94e9408f589966c2040187245d81 (diff)
downloadstable-diffusion-webui-gfx803-d609f6030ec464b371a899ced366c62bbd9a4a91.tar.gz
stable-diffusion-webui-gfx803-d609f6030ec464b371a899ced366c62bbd9a4a91.tar.bz2
stable-diffusion-webui-gfx803-d609f6030ec464b371a899ced366c62bbd9a4a91.zip
Add [batch_number] and [generation_number] filename patterns
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py
index 6d9c6a8d..0e6a60ba 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -670,6 +670,8 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
p.scripts.postprocess_batch(p, x_samples_ddim, batch_number=n)
for i, x_sample in enumerate(x_samples_ddim):
+ p.batch_index = i
+
x_sample = 255. * np.moveaxis(x_sample.cpu().numpy(), 0, 2)
x_sample = x_sample.astype(np.uint8)
@@ -718,7 +720,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
if opts.return_mask:
output_images.append(image_mask)
-
+
if opts.return_mask_composite:
output_images.append(image_mask_composite)