From 20f66ce3c8b8a9dbefe050b40453f91e6294209b Mon Sep 17 00:00:00 2001 From: Tung Nguyen Date: Wed, 20 Sep 2023 09:31:02 +0700 Subject: [PATCH] update negative index logic to support sliding window latents --- control.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control.py b/control.py index 6c57b1a..0bf49fc 100644 --- a/control.py +++ b/control.py @@ -231,7 +231,7 @@ class ControlNetAdvanced(ControlNet): real_index = keyframe.batch_index # if negative, count from end if real_index < 0: - real_index = latent_count + real_index + real_index += latent_count if self.sub_idxs is None else self.full_latent_length # if not mapping indeces, what you see is what you get if mapped_indeces is None: