aboutsummaryrefslogtreecommitdiffstats
path: root/modules/processing.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-09-18 14:56:47 +0000
committerGitHub <noreply@github.com>2022-09-18 14:56:47 +0000
commitabd5cc6b2b2aa48e304f4fff3c8259137ad187ca (patch)
tree1f5089f9bd1164923a06430a4e2b71805f9a67d0 /modules/processing.py
parentcf651a5e23ad11b961f5e72b4999cf8633bbdf68 (diff)
parenta96076f49ce7755ebdf3cad588b5c0d2f1f93035 (diff)
downloadstable-diffusion-webui-gfx803-abd5cc6b2b2aa48e304f4fff3c8259137ad187ca.tar.gz
stable-diffusion-webui-gfx803-abd5cc6b2b2aa48e304f4fff3c8259137ad187ca.tar.bz2
stable-diffusion-webui-gfx803-abd5cc6b2b2aa48e304f4fff3c8259137ad187ca.zip
Merge pull request #585 from JohanAR/ui_seed_changes
Polish seed UI options
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/processing.py b/modules/processing.py
index 1afbe39c..244ed639 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -83,11 +83,13 @@ class StableDiffusionProcessing:
class Processed:
- def __init__(self, p: StableDiffusionProcessing, images_list, seed, info):
+ def __init__(self, p: StableDiffusionProcessing, images_list, seed, subseed, info):
self.images = images_list
self.prompt = p.prompt
self.negative_prompt = p.negative_prompt
self.seed = seed
+ self.subseed = subseed
+ self.subseed_strength = p.subseed_strength
self.info = info
self.width = p.width
self.height = p.height
@@ -100,6 +102,8 @@ class Processed:
"prompt": self.prompt if type(self.prompt) != list else self.prompt[0],
"negative_prompt": self.negative_prompt if type(self.negative_prompt) != list else self.negative_prompt[0],
"seed": int(self.seed if type(self.seed) != list else self.seed[0]),
+ "subseed": int(self.subseed if type(self.subseed) != list else self.subseed[0]),
+ "subseed_strength": self.subseed_strength,
"width": self.width,
"height": self.height,
"sampler": self.sampler,
@@ -352,7 +356,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
images.save_image(grid, p.outpath_grids, "grid", all_seeds[0], all_prompts[0], opts.grid_format, info=infotext(), short_filename=not opts.grid_extended_filename, p=p)
devices.torch_gc()
- return Processed(p, output_images, all_seeds[0], infotext())
+ return Processed(p, output_images, all_seeds[0], all_subseeds[0], infotext())
class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):