From 371b24b17c1cf98c9068a4b585b93cc1610702dc Mon Sep 17 00:00:00 2001 From: catboxanon <122327233+catboxanon@users.noreply.github.com> Date: Tue, 15 Aug 2023 02:19:19 -0400 Subject: Add extra img2img noise --- modules/sd_samplers_timesteps.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/sd_samplers_timesteps.py') diff --git a/modules/sd_samplers_timesteps.py b/modules/sd_samplers_timesteps.py index c1f534ed..670e2151 100644 --- a/modules/sd_samplers_timesteps.py +++ b/modules/sd_samplers_timesteps.py @@ -103,6 +103,10 @@ class CompVisSampler(sd_samplers_common.Sampler): xi = x * sqrt_alpha_cumprod + noise * sqrt_one_minus_alpha_cumprod + if opts.img2img_extra_noise > 0: + p.extra_generation_params["Extra noise"] = opts.img2img_extra_noise + xi += noise * opts.img2img_extra_noise * sqrt_alpha_cumprod + extra_params_kwargs = self.initialize(p) parameters = inspect.signature(self.func).parameters -- cgit v1.2.1