update negative index logic to support sliding window latents

This commit is contained in:
Tung Nguyen
2023-09-20 09:31:02 +07:00
parent 7325a08000
commit 20f66ce3c8
+1 -1
View File
@@ -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: