calculate actual step for samplers with higher order

This commit is contained in:
Vladimir Mandic
2024-06-28 10:29:09 -04:00
parent 7bb0a90b94
commit 61ab51b6da
+2 -1
View File
@@ -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: