X-PLUG / mPLUG-DocOwl

mPLUG-DocOwl: Modularized Multimodal Large Language Model for Document Understanding
Apache License 2.0
1.34k stars 84 forks source link

IndexError: piece id is out of range #75

Open AkshataABhat opened 4 months ago

AkshataABhat commented 4 months ago

Hi getting this error while running inference: Reloading the model helps, but it is extremely time consuming.

The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input'sattention_maskto obtain reliable results. Settingpad_token_idtoeos_token_id`:2 for open-end generation.

IndexError Traceback (most recent call last) in <cell line: 3>() 1 image='../2-015-000213-1.jpg' 2 query='Extract all the grammatically complete sentences in the invoice.' ----> 3 answer=docowl.inference(image, query) 4 print(answer)

9 frames /usr/local/lib/python3.10/dist-packages/sentencepiece/init.py in _func(v, n) 1036 def _func(v, n): 1037 if type(n) is int and (n < 0 or n >= v.piece_size()): -> 1038 raise IndexError('piece id is out of range.') 1039 return func(v, n) 1040

IndexError: piece id is out of range.`

HAWLYQ commented 4 months ago

Hi, @AkshataABhat, I have never met such issues, could you provide this image to me to reproduce this problem?