Skip to content

Commit

Permalink
Update mmbench.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LZHgrla authored Apr 22, 2024
1 parent 05a8fcb commit 236d006
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xtuner/tools/mmbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,13 @@ def main():
'Please specify the `--visual-encoder`!')
visual_encoder_path = args.visual_encoder
with LoadWoInit():
if 'clip' in visual_encoder_path:
if 'clip' in visual_encoder_path.lower():
visual_encoder = CLIPVisionModel.from_pretrained(
visual_encoder_path,
torch_dtype=TORCH_DTYPE_MAP[args.torch_dtype])
image_processor = CLIPImageProcessor.from_pretrained(
visual_encoder_path)
elif 'siglip' in visual_encoder_path:
elif 'siglip' in visual_encoder_path.lower():
visual_encoder = SiglipVisionModel.from_pretrained(
visual_encoder_path,
torch_dtype=TORCH_DTYPE_MAP[args.torch_dtype])
Expand Down

0 comments on commit 236d006

Please # to comment.