UniTok
UniTok copied to clipboard
ValueError: The following `model_kwargs` are not used by the model: ['images', 'image_sizes']
Thank you for your awesome work! When I using the MLLM with UniTok, I met some problems: When run:
with torch.inference_mode():
output_ids = model.generate(
input_ids,
image=image_tensor.unsqueeze(0).half().cuda(),
image_sizes=[image.size],
do_sample=True if args.temperature > 0 else False,
temperature=args.temperature,
top_p=args.top_p,
num_beams=args.num_beams,
# no_repeat_ngram_size=3,
max_new_tokens=1024,
use_cache=True)
Got:
ValueError: The following model_kwargs are not used by the model: ['images', 'image_sizes'] (note: typos in the generate arguments will also show up in this list)
Could you give me some idea?Thank!
Hi there, sorry for the late reply. You may run inference with our customized generate function, e.g., generate_mllm() as in this line.