From c4118d24181011aec41ba8d19050c652cc278912 Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Thu, 12 Oct 2023 18:55:33 -0700 Subject: [PATCH] i (#664) --- modules/sample_hijack.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/sample_hijack.py b/modules/sample_hijack.py index e1ba3fba..eb6cfdd1 100644 --- a/modules/sample_hijack.py +++ b/modules/sample_hijack.py @@ -134,6 +134,9 @@ def sample_hacked(model, noise, positive, negative, cfg, device, sampler, sigmas if step == refiner_switch_step and current_refiner is not None: refiner_switch() if callback is not None: + # residual_noise_preview = x - x0 + # residual_noise_preview /= residual_noise_preview.std() + # residual_noise_preview *= x0.std() callback(step, x0, x, total_steps) samples = sampler.sample(model_wrap, sigmas, extra_args, callback_wrap, noise, latent_image, denoise_mask, disable_pbar)