From e007d405d57fe31394e40bacfe7f592063bd0f67 Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Sun, 4 Feb 2024 00:49:40 -0800 Subject: [PATCH] a1111 --- modules/sd_samplers_cfg_denoiser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/sd_samplers_cfg_denoiser.py b/modules/sd_samplers_cfg_denoiser.py index d433926f..4289c4b4 100644 --- a/modules/sd_samplers_cfg_denoiser.py +++ b/modules/sd_samplers_cfg_denoiser.py @@ -182,6 +182,10 @@ class CFGDenoiser(torch.nn.Module): denoised = forge_sampler.forge_sample(self, denoiser_params=denoiser_params, cond_scale=cond_scale, cond_composition=cond_composition) + # Blend in the original latents (after) + if not self.mask_before_denoising and self.mask is not None: + denoised = apply_blend(denoised) + preview = self.sampler.last_latent = denoised sd_samplers_common.store_latent(preview)