From 9ab5589a62d308897e9f0302fbdd34e40a41e34d Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Thu, 25 Jan 2024 08:18:56 -0800 Subject: [PATCH] Update sd_samplers_timesteps.py --- modules/sd_samplers_timesteps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sd_samplers_timesteps.py b/modules/sd_samplers_timesteps.py index a99a6a18..fc0505ef 100644 --- a/modules/sd_samplers_timesteps.py +++ b/modules/sd_samplers_timesteps.py @@ -115,7 +115,7 @@ class CompVisSampler(sd_samplers_common.Sampler): sqrt_alpha_cumprod = torch.sqrt(alphas_cumprod[timesteps[t_enc]]) sqrt_one_minus_alpha_cumprod = torch.sqrt(1 - alphas_cumprod[timesteps[t_enc]]) - xi = x * sqrt_alpha_cumprod + noise * sqrt_one_minus_alpha_cumprod + xi = x.to(noise) * 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