From 61ab51b6da149f88a8512279c078ada8750e902b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 28 Jun 2024 10:29:09 -0400 Subject: [PATCH] calculate actual step for samplers with higher order --- modules/processing_callbacks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/processing_callbacks.py b/modules/processing_callbacks.py index 824a79007..d6b81b21c 100644 --- a/modules/processing_callbacks.py +++ b/modules/processing_callbacks.py @@ -38,7 +38,8 @@ def diffusers_callback(pipe, step: int, timestep: int, kwargs: dict): return kwargs latents = kwargs.get('latents', None) debug_callback(f'Callback: step={step} timestep={timestep} latents={latents.shape if latents is not None else None} kwargs={list(kwargs)}') - shared.state.sampling_step = step + order = getattr(pipe.scheduler, "order", 1) if hasattr(pipe, 'scheduler') else 1 + shared.state.sampling_step = step // order if shared.state.interrupted or shared.state.skipped: raise AssertionError('Interrupted...') if shared.state.paused: