diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-15 06:50:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-15 06:50:20 +0000 |
commit | bc61ad9ec8cece0dc4ad445ee29abf4e9305f2df (patch) | |
tree | b4aa6ca6232790900923c05370bdafeef5e41de0 /modules/sd_samplers_timesteps.py | |
parent | 79d4e81984171a047d6c71d97a67dda7dd87c43c (diff) | |
parent | 371b24b17c1cf98c9068a4b585b93cc1610702dc (diff) | |
download | stable-diffusion-webui-gfx803-bc61ad9ec8cece0dc4ad445ee29abf4e9305f2df.tar.gz stable-diffusion-webui-gfx803-bc61ad9ec8cece0dc4ad445ee29abf4e9305f2df.tar.bz2 stable-diffusion-webui-gfx803-bc61ad9ec8cece0dc4ad445ee29abf4e9305f2df.zip |
Merge pull request #12564 from catboxanon/feat/img2img-noise
Add extra noise param for img2img operations
Diffstat (limited to 'modules/sd_samplers_timesteps.py')
-rw-r--r-- | modules/sd_samplers_timesteps.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/sd_samplers_timesteps.py b/modules/sd_samplers_timesteps.py index 66e83ff7..68aea454 100644 --- a/modules/sd_samplers_timesteps.py +++ b/modules/sd_samplers_timesteps.py @@ -104,6 +104,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
|