Skip to content
Snippets Groups Projects
Unverified Commit c878cc3e authored by Haotian Liu's avatar Haotian Liu Committed by GitHub
Browse files

Merge pull request #1038 from heltrix/patch-1

[Fix] Add image_sizes for cli.py for LLaVA-v1.6
parents ac6b1e76 4718611d
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,7 @@ def main(args):
roles = conv.roles
image = load_image(args.image_file)
image_size = image.size
# Similar operation in model_worker.py
image_tensor = process_images([image], image_processor, model.config)
if type(image_tensor) is list:
......@@ -94,6 +95,7 @@ def main(args):
output_ids = model.generate(
input_ids,
images=image_tensor,
image_sizes=[image_size],
do_sample=True if args.temperature > 0 else False,
temperature=args.temperature,
max_new_tokens=args.max_new_tokens,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment