Skip to content

Commit 8557367

Browse files
authored
Fix typo in qwen_vl that was causing "reference before assignment"
1 parent 3dcd015 commit 8557367

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lmms_eval/models/qwen_vl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def _collate(x):
230230
raise ValueError(f"Expected `gen_kwargs['until']` to be of type Union[str,list] but got {type(until)}")
231231
for i in range(len(contexts)):
232232
if "<image>" in contexts[i]:
233-
context[i] = contexts[i].replace("<image>", "")
233+
contexts[i] = contexts[i].replace("<image>", "")
234234
questions = [self.prompt.format(visual_path, context) for visual_path, context in zip(visual_paths, contexts)]
235235

236236
# Similar to llava, is visual paths has len 0

0 commit comments

Comments
 (0)