Skip to content

Commit

Permalink
Fix typo in qwen_vl that was causing "reference before assignment"
Browse files Browse the repository at this point in the history
  • Loading branch information
tupini07 authored Apr 22, 2024
1 parent 3dcd015 commit 8557367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmms_eval/models/qwen_vl.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _collate(x):
raise ValueError(f"Expected `gen_kwargs['until']` to be of type Union[str,list] but got {type(until)}")
for i in range(len(contexts)):
if "<image>" in contexts[i]:
context[i] = contexts[i].replace("<image>", "")
contexts[i] = contexts[i].replace("<image>", "")
questions = [self.prompt.format(visual_path, context) for visual_path, context in zip(visual_paths, contexts)]

# Similar to llava, is visual paths has len 0
Expand Down

0 comments on commit 8557367

Please sign in to comment.