Skip to content

Commit

Permalink
revert SGM noise multiplier change for img2img because it breaks hire…
Browse files Browse the repository at this point in the history
…s fix
  • Loading branch information
AUTOMATIC1111 committed Aug 29, 2023
1 parent 00e393c commit a0af285
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions modules/sd_samplers_kdiffusion.py
Expand Up @@ -144,13 +144,7 @@ def sample_img2img(self, p, x, noise, conditioning, unconditional_conditioning,
sigmas = self.get_sigmas(p, steps)
sigma_sched = sigmas[steps - t_enc - 1:]

if opts.sgm_noise_multiplier:
p.extra_generation_params["SGM noise multiplier"] = True
noise_multiplier = torch.sqrt(1.0 + sigma_sched[0] ** 2.0)
else:
noise_multiplier = sigma_sched[0]

xi = x + noise * noise_multiplier
xi = x + noise * sigma_sched[0]

if opts.img2img_extra_noise > 0:
p.extra_generation_params["Extra noise"] = opts.img2img_extra_noise
Expand Down

0 comments on commit a0af285

Please sign in to comment.