Skip to content

Commit

Permalink
Fix run_llava.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyken17 authored Mar 13, 2024
1 parent 3d6f1a6 commit 9ae25d4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions llava/eval/run_llava.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ def eval_model(args):
else:
qs = re.sub(IMAGE_PLACEHOLDER, DEFAULT_IMAGE_TOKEN, qs)
else:
if model.config.mm_use_im_start_end:
qs = image_token_se + "\n" + qs
else:
qs = DEFAULT_IMAGE_TOKEN + "\n" + qs
if DEFAULT_IMAGE_TOKEN not in qs:
if model.config.mm_use_im_start_end:
qs = image_token_se + "\n" + qs
else:
qs = DEFAULT_IMAGE_TOKEN + "\n" + qs

if "llama-2" in model_name.lower():
conv_mode = "llava_llama_2"
Expand Down

0 comments on commit 9ae25d4

Please sign in to comment.