diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-12-10 06:36:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 06:36:24 +0000 |
commit | 8ee1acc1e4178c7df1359d1ba9b533eacd7d8c96 (patch) | |
tree | e9b0dc19eea7fb5a8d6b2d0b372d7b8c4f4bf0c4 /modules | |
parent | e5e557fa5ddf569342b65967bada8c8dd9c4fb6a (diff) | |
parent | cf3e844d1d31d64f3234a0fbdfcac91cc5834657 (diff) | |
download | stable-diffusion-webui-gfx803-8ee1acc1e4178c7df1359d1ba9b533eacd7d8c96.tar.gz stable-diffusion-webui-gfx803-8ee1acc1e4178c7df1359d1ba9b533eacd7d8c96.tar.bz2 stable-diffusion-webui-gfx803-8ee1acc1e4178c7df1359d1ba9b533eacd7d8c96.zip |
Merge pull request #5373 from mezotaken/master
add noise strength parameter similar to NAI
Diffstat (limited to 'modules')
-rw-r--r-- | modules/processing.py | 1 | ||||
-rw-r--r-- | modules/shared.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/modules/processing.py b/modules/processing.py index 0417ffc5..dd22a2fa 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -891,6 +891,7 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing): def sample(self, conditioning, unconditional_conditioning, seeds, subseeds, subseed_strength, prompts):
x = create_random_tensors([opt_C, self.height // opt_f, self.width // opt_f], seeds=seeds, subseeds=subseeds, subseed_strength=self.subseed_strength, seed_resize_from_h=self.seed_resize_from_h, seed_resize_from_w=self.seed_resize_from_w, p=self)
+ x = x*shared.opts.initial_noise_multiplier
samples = self.sampler.sample_img2img(self, self.init_latent, x, conditioning, unconditional_conditioning, image_conditioning=self.image_conditioning)
diff --git a/modules/shared.py b/modules/shared.py index dc45fcaa..67f8f77b 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -359,6 +359,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "sd_hypernetwork": OptionInfo("None", "Hypernetwork", gr.Dropdown, lambda: {"choices": ["None"] + [x for x in hypernetworks.keys()]}, refresh=reload_hypernetworks),
"sd_hypernetwork_strength": OptionInfo(1.0, "Hypernetwork strength", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.001}),
"inpainting_mask_weight": OptionInfo(1.0, "Inpainting conditioning mask strength", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}),
+ "initial_noise_multiplier": OptionInfo(1.0, "Multiply initial noise by this factor, may result in less or more detailed img2img", gr.Slider, {"minimum": 0.5, "maximum": 1.5, "step": 0.01 }),
"img2img_color_correction": OptionInfo(False, "Apply color correction to img2img results to match original colors."),
"img2img_fix_steps": OptionInfo(False, "With img2img, do exactly the amount of steps the slider specifies (normally you'd do less with less denoising)."),
"enable_quantization": OptionInfo(False, "Enable quantization in K samplers for sharper and cleaner results. This may change existing seeds. Requires restart to apply."),
|