LTX2 context windows - Fix crash when a window doesn't have a guide index

This commit is contained in:
ozbayb 2026-04-05 14:30:54 -06:00
parent ef61ddfaed
commit 9566c18ced
2 changed files with 2 additions and 1 deletions

View File

@ -465,6 +465,7 @@ class IndexListContextHandler(ContextHandlerABC):
window.guide_kf_local_positions = kf_local_pos
else:
sliced_guide = None
window.guide_suffix_indices = []
window.guide_overlap_info = []
window.guide_kf_local_positions = []
else:

View File

@ -1315,7 +1315,7 @@ class LTXVModel(LTXBaseModel):
x = x * (1 + scale) + shift
x = self.proj_out(x)
if keyframe_idxs is not None:
if keyframe_idxs is not None and keyframe_idxs.shape[2] > 0:
grid_mask = kwargs["grid_mask"]
orig_patchified_shape = kwargs["orig_patchified_shape"]
full_x = torch.zeros(orig_patchified_shape, dtype=x.dtype, device=x.device)