Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
马逴凡 committed Jun 7, 2024
1 parent a211671 commit d3a95b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion groma/eval/run_groma.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def eval_model(model_name, quant_type, image_file, query,):
)
kwargs = {'quantization_config': int4_quant_cfg}

model = GromaModel.from_pretrained(model_name, **kwargs).cuda()
if quant_type == '8bit' or quant_type == '4bit':
model = GromaModel.from_pretrained(model_name, **kwargs)
else:
model = GromaModel.from_pretrained(model_name, **kwargs).cuda()
model.init_special_token_id(tokenizer)

conversations = []
Expand Down

0 comments on commit d3a95b6

Please sign in to comment.