From f26e303f65abaaac6a3085c4620c2ed1e428dfd2 Mon Sep 17 00:00:00 2001 From: Brendan Lackey Date: Thu, 29 May 2025 16:22:51 -0700 Subject: [PATCH] Account for 2nd order samplers with integer division --- scripts/detail_daemon.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/detail_daemon.py b/scripts/detail_daemon.py index a7c23da..5666481 100644 --- a/scripts/detail_daemon.py +++ b/scripts/detail_daemon.py @@ -170,10 +170,9 @@ class Script(scripts.Script): return if self.schedule is None: - self.schedule = self.make_schedule( - max(params.total_sampling_steps, params.denoiser.total_steps), - **self.schedule_params, - ) + 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) multiplier = self.schedule[idx] * .1