From 5affc0d38082acfbcd70cf8b5b6645825856ed0d Mon Sep 17 00:00:00 2001 From: Muerrilla <48160881+muerrilla@users.noreply.github.com> Date: Fri, 30 May 2025 17:12:58 +0330 Subject: [PATCH] Update detail_daemon.py --- scripts/detail_daemon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/detail_daemon.py b/scripts/detail_daemon.py index 5666481..8a05ab7 100644 --- a/scripts/detail_daemon.py +++ b/scripts/detail_daemon.py @@ -168,13 +168,13 @@ class Script(scripts.Script): def denoiser_callback(self, params): if self.is_hires: return - + step = max(params.sampling_step, params.denoiser.step) + total_steps = max(params.total_sampling_steps, params.denoiser.total_steps) + corrected_step_count = total_steps - max(total_steps // params.denoiser.steps - 1, 0) if self.schedule is None: - total_steps = max(params.total_sampling_steps, params.denoiser.total_steps) - corrected_step_count = total_steps - max(total_steps // params.denoiser.steps - 1, 0) self.schedule = self.make_schedule(corrected_step_count, **self.schedule_params) - idx = max(params.sampling_step, params.denoiser.step) + idx = min(step, corrected_step_count - 1) multiplier = self.schedule[idx] * .1 mode = self.mode if params.sigma.size(0) == 1 and mode != "both":