Skip to content

Commit 8f4883d

Browse files
author
Ye Shaokai
committed
removed frame time from training too
1 parent d962825 commit 8f4883d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llava/train/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ def _get_item(self, i) -> Dict[str, torch.Tensor]:
12321232
processor = self.data_args.image_processor
12331233
image = processor.preprocess(video, return_tensors="pt")["pixel_values"]
12341234
if self.data_args.add_time_instruction:
1235-
time_instruciton = f"The video lasts for {video_time:.2f} seconds, and {num_frames_to_sample} frames are uniformly sampled from it. These frames are located at {frame_time}.Please answer the following questions related to this video."
1235+
time_instruciton = f"The video lasts for {video_time:.2f} seconds, and {num_frames_to_sample} frames are uniformly sampled from it. Please answer the following questions related to this video."
12361236
sources[0]["conversations"][0]["value"] = f'{DEFAULT_IMAGE_TOKEN}\n{time_instruciton}\n{sources[0]["conversations"][0]["value"].replace(DEFAULT_IMAGE_TOKEN, "")}'
12371237
image = [(image, video[0].size, "video")]
12381238
sources = preprocess_multimodal(copy.deepcopy([e["conversations"] for e in sources]), self.data_args)

0 commit comments

Comments
 (0)