ValueError: The input provided to the model are wrong. The number of image tokens is 0 while the number of image given to the model is 1. This prevents correct indexing and breaks batch generation.
zhangchunjie1999 opened this issue · comments
zhangchunjie1999 commented
zhangchunjie1999 commented
Kaiyue Sun commented
same problem
zhangchunjie1999 commented
I found a solution.
In tasks/eval/model_util.py,
remove
# try: # processor = PllavaProcessor.from_pretrained(repo_id) # except Exception as e: # processor = PllavaProcessor.from_pretrained('llava-hf/llava-1.5-7b-hf')
and add:
processor = PllavaProcessor.from_pretrained(repo_id)
then:
Install the required packages
PavanMV commented
Its image_token_index problem, looks like new LlamaTokenizer image_token_index = 64000 where as pllava config image_token_index = 64002, change it to 64000.