diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-21 13:34:10 +0300 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-21 13:34:10 +0300 |
commit | 75dd274dd606f177247809d92a8c362abfbc5cdf (patch) | |
tree | d8a9937c0b525c63de53984f5544fcf60c72e537 /modules/processing.py | |
parent | 45c46f4cb3d6924882bd944712be168c7c2f605d (diff) |
prevent seed extras from having effect when extras checkbox is not checked
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py index 256e8aae..e844b7e2 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -46,7 +46,7 @@ def apply_color_correction(correction, image): class StableDiffusionProcessing:
- def __init__(self, sd_model=None, outpath_samples=None, outpath_grids=None, prompt="", styles=None, seed=-1, subseed=-1, subseed_strength=0, seed_resize_from_h=-1, seed_resize_from_w=-1, sampler_index=0, batch_size=1, n_iter=1, steps=50, cfg_scale=7.0, width=512, height=512, restore_faces=False, tiling=False, do_not_save_samples=False, do_not_save_grid=False, extra_generation_params=None, overlay_images=None, negative_prompt=None):
+ def __init__(self, sd_model=None, outpath_samples=None, outpath_grids=None, prompt="", styles=None, seed=-1, subseed=-1, subseed_strength=0, seed_resize_from_h=-1, seed_resize_from_w=-1, seed_enable_extras=True, sampler_index=0, batch_size=1, n_iter=1, steps=50, cfg_scale=7.0, width=512, height=512, restore_faces=False, tiling=False, do_not_save_samples=False, do_not_save_grid=False, extra_generation_params=None, overlay_images=None, negative_prompt=None):
self.sd_model = sd_model
self.outpath_samples: str = outpath_samples
self.outpath_grids: str = outpath_grids
@@ -76,6 +76,12 @@ class StableDiffusionProcessing: self.color_corrections = None
self.denoising_strength: float = 0
+ if not seed_enable_extras:
+ self.subseed = -1
+ self.subseed_strength = 0
+ self.seed_resize_from_h = 0
+ self.seed_resize_from_w = 0
+
def init(self, all_prompts, all_seeds, all_subseeds):
pass
|