From b2466a64543859f938331f746f556c6885ea2bd4 Mon Sep 17 00:00:00 2001 From: Raphael Walker Date: Thu, 27 Feb 2025 16:33:39 +0100 Subject: [PATCH] properly reset caches etc on t=0 --- ras.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ras.py b/ras.py index b861a8c..c63f171 100644 --- a/ras.py +++ b/ras.py @@ -94,6 +94,11 @@ class RASManager: self.timestep = self.timestep_from_sigmas( transformer_options["sigmas"], transformer_options["sample_sigmas"] ) + if self.timestep == 0: + # reset as much as possible + self.live_img_indices = None + self.live_txt_indices = None + self.drop_count = None return forward_orig(*args, **kwargs) model.forward_orig = MethodType(new_forward, model)