Skip to content

Commit

Permalink
fixed merge remnants
Browse files Browse the repository at this point in the history
  • Loading branch information
BernardZach committed Dec 5, 2024
1 parent c08243b commit 07121a8
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def forward(
output_hidden_states=output_hidden_states,
return_dict=return_dict,
interpolate_pos_encoding=interpolate_pos_encoding,
)
)git
image_embeds = vision_outputs[0]

# step 2: forward the query tokens through the QFormer, using the image embeddings for cross-attention
Expand Down Expand Up @@ -441,11 +441,7 @@ def generate(
if input_ids is None:
start_tokens = [self.config.text_config.bos_token_id]
if getattr(self.config, "video_token_index", None) is not None:
<<<<<<< HEAD
start_tokens += [self.config.video_token_index] * self.config.num_query_tokens * 4
=======
start_tokens = [self.config.video_token_index] * self.config.num_query_tokens * 4 + start_tokens
>>>>>>> upstream/main
input_ids = torch.tensor([start_tokens], dtype=torch.long, device=image_embeds.device)
input_ids = input_ids.repeat(batch_size, 1)

Expand Down

0 comments on commit 07121a8

Please sign in to comment.