Skip to content

Commit 88643f3

Browse files
committed
Fix logging of guide frame number
1 parent d1a9e2e commit 88643f3

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

comfy/context_windows.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,6 @@ def _execute_extended(self, calc_cond_batch: Callable, model: BaseModel, conds:
485485
is_multimodal = window_data.latent_shapes is not None and len(window_data.latent_shapes) > 1
486486

487487
primary_frames = window_data.tensor
488-
num_guide_frames = window_data.guide_frames.size(self.dim) if window_data.guide_frames is not None else 0
489-
490488
context_windows = self.get_context_windows(model, primary_frames, model_options)
491489
enumerated_context_windows = list(enumerate(context_windows))
492490
total_windows = len(enumerated_context_windows)
@@ -508,9 +506,6 @@ def _execute_extended(self, calc_cond_batch: Callable, model: BaseModel, conds:
508506

509507
for window_idx, window in enumerated_context_windows:
510508
comfy.model_management.throw_exception_if_processing_interrupted()
511-
logging.info(f"Context window {window_idx + 1}/{total_windows}: frames {window.index_list[0]}-{window.index_list[-1]} of {primary_frames.shape[self.dim]}"
512-
+ (f" (+{num_guide_frames} guide frames)" if num_guide_frames > 0 else "")
513-
+ (f" [{len(latents)} modalities]" if is_multimodal else ""))
514509

515510
# Per-modality window indices
516511
if is_multimodal:
@@ -547,6 +542,9 @@ def _execute_extended(self, calc_cond_batch: Callable, model: BaseModel, conds:
547542
sliced_primary, num_guide_frames = inject_guide_frames_into_window(sliced_video, window, window_data, self.dim)
548543
else:
549544
sliced_primary, num_guide_frames = sliced_video, 0
545+
logging.info(f"Context window {window_idx + 1}/{total_windows}: frames {window.index_list[0]}-{window.index_list[-1]} of {primary_frames.shape[self.dim]}"
546+
+ (f" (+{num_guide_frames} guide frames)" if num_guide_frames > 0 else "")
547+
+ (f" [{len(latents)} modalities]" if is_multimodal else ""))
550548
sliced = [sliced_primary] + [per_modality_windows_list[mi].get_tensor(latents[mi]) for mi in range(1, len(latents))]
551549

552550
sub_x, sub_shapes = self._pack(sliced)

0 commit comments

Comments
 (0)