Skip to content

Commit

Permalink
[Fix] Fix LLaVA-OneVision-HF
Browse files Browse the repository at this point in the history
  • Loading branch information
kennymckormick committed Jan 3, 2025
1 parent 276d90a commit 0835f17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vlmeval/vlm/llava/llava.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,12 +815,12 @@ def generate_inner_image(self, message, dataset=None):
{
"role": "user",
"content": [
{"type": "text", "text": content.split("\n", 1)[-1]},
{"type": "image"},
{"type": "text", "text": content},
],
}
]
prompt = self.processor.apply_chat_template(conversation, add_generation_prompt=True)
print(prompt)
inputs = self.processor(images=images, text=prompt, return_tensors="pt").to('cuda', torch.float16)

output = self.model.generate(**inputs, max_new_tokens=512)
Expand Down

0 comments on commit 0835f17

Please sign in to comment.