-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sp_token=32110 #28
Comments
Hello, I tried the method you mentioned, but encountered an error. Do you have any suggestions? Thank you very much! Here is the complete error information.
|
Hi, did you solve the empty tensor issue? Thanks in advance! |
I met the same issue. Did you solve the empty tensor issue? Thanks in advance! |
Hi, the problem for me was that Huggingface updated their Instruction-Blip model to support images and videos. Basically, they add two new tokens for image and video.
Hope this helps! |
Thank you so much for your warm help. I added your code in example.ipynb file, but it still doesn't work with the same error.`# For T5 based model if 'instructblip' in model_type: image_palceholder="图" ##modify the sp_token_id sp = sp+processor.tokenizer.additional_special_tokens[len(sp):] if model.qformer.embeddings.word_embeddings.weight.shape[0] != len(processor.qformer_tokenizer): |
I remember another possible reason is the size of the image. But if you're using the example notebook that shouldn't be the issue here? I can't run the model now, but I'll share it here if it's not working for me again or I find another fix. |
Hello, I found that the SP_TOKEN should be set to 32110 in Demo, otherwise the Image Token cannot be replaced, resulting in poor results, thank you!
The text was updated successfully, but these errors were encountered: