mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-03-13 00:49:48 +00:00
fix flux img2img and highres.fix math
This commit is contained in:
@@ -139,7 +139,8 @@ class KDiffusionSampler(sd_samplers_common.Sampler):
|
||||
sigma_sched = sigmas[steps - t_enc - 1:]
|
||||
|
||||
x = x.to(noise)
|
||||
xi = x + noise * sigma_sched[0]
|
||||
|
||||
xi = self.model_wrap.predictor.noise_scaling(sigma_sched[0], noise, x, max_denoise=False)
|
||||
|
||||
if opts.img2img_extra_noise > 0:
|
||||
p.extra_generation_params["Extra noise"] = opts.img2img_extra_noise
|
||||
@@ -198,9 +199,8 @@ class KDiffusionSampler(sd_samplers_common.Sampler):
|
||||
|
||||
if opts.sgm_noise_multiplier:
|
||||
p.extra_generation_params["SGM noise multiplier"] = True
|
||||
x = x * torch.sqrt(1.0 + sigmas[0] ** 2.0)
|
||||
else:
|
||||
x = x * sigmas[0]
|
||||
|
||||
x = self.model_wrap.predictor.noise_scaling(sigmas[0], x, torch.zeros_like(x), max_denoise=opts.sgm_noise_multiplier)
|
||||
|
||||
extra_params_kwargs = self.initialize(p)
|
||||
parameters = inspect.signature(self.func).parameters
|
||||
|
||||
Reference in New Issue
Block a user