@@ -126,7 +126,6 @@ def preprocess_video_and_text(self, fastvideo_args: FastVideoArgs, args):
126126 valid_data ["pixel_values" ].to (
127127 fastvideo_args .device )).mean
128128
129- # Get corresponding captions for this batch
130129 batch_captions = valid_data ["text" ]
131130
132131 batch = ForwardBatch (
@@ -142,7 +141,7 @@ def preprocess_video_and_text(self, fastvideo_args: FastVideoArgs, args):
142141
143142 # Get sequence lengths from attention masks (number of 1s)
144143 seq_lens = prompt_attention_mask .sum (dim = 1 )
145- # Create a list to store non-padded embeddings and masks
144+
146145 non_padded_embeds = []
147146 non_padded_masks = []
148147
@@ -382,7 +381,7 @@ def preprocess_validation_text(self, fastvideo_args: FastVideoArgs, args):
382381
383382 # Get the sequence length from attention mask (number of 1s)
384383 seq_len = prompt_attention_mask .sum ().item ()
385- # Slice the embeddings to keep only the non-padding parts
384+
386385 text_embedding = prompt_embeds [0 , :seq_len ].cpu ().numpy ()
387386 text_attention_mask = prompt_attention_mask [
388387 0 , :seq_len ].cpu ().numpy ().astype (np .uint8 )
@@ -489,7 +488,6 @@ def preprocess_validation_text(self, fastvideo_args: FastVideoArgs, args):
489488 f"Failed to process range { work_range [0 ]} -{ work_range [1 ]} : { str (e )} "
490489 )
491490
492- # Retry failed ranges sequentially
493491 if failed_ranges :
494492 logger .warning (
495493 f"Retrying { len (failed_ranges )} failed ranges sequentially" )
0 commit comments