diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index e3906d1a..1c1f7f16 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -147,6 +147,9 @@ class KDiffusionSampler(sd_samplers_common.Sampler): [unet_patcher], unet_patcher.memory_required([x.shape[0] * 2] + list(x.shape[1:])) + inference_memory) + self.model_wrap.log_sigmas = self.model_wrap.log_sigmas.to(unet_patcher.current_device) + self.model_wrap.sigmas = self.model_wrap.sigmas.to(unet_patcher.current_device) + steps, t_enc = sd_samplers_common.setup_img2img_steps(p, steps) sigmas = self.get_sigmas(p, steps) diff --git a/modules/sd_samplers_timesteps.py b/modules/sd_samplers_timesteps.py index e008e6cb..a99a6a18 100644 --- a/modules/sd_samplers_timesteps.py +++ b/modules/sd_samplers_timesteps.py @@ -104,6 +104,8 @@ class CompVisSampler(sd_samplers_common.Sampler): [unet_patcher], unet_patcher.memory_required([x.shape[0] * 2] + list(x.shape[1:])) + inference_memory) + self.model_wrap.inner_model.alphas_cumprod = self.model_wrap.inner_model.alphas_cumprod.to(unet_patcher.current_device) + steps, t_enc = sd_samplers_common.setup_img2img_steps(p, steps) timesteps = self.get_timesteps(p, steps)