-
Notifications
You must be signed in to change notification settings - Fork 605
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
The size of tensor a (3) must match the size of tensor b (9) at non-singleton dimension 0 #165
Comments
same issue |
same issue, waiting for fixing |
same issue |
I suggest opening an issue with kohya_ss in his repo as he is the one maintaining the behind the scene code. I only wrap his script in a GUI: https://github.com/kohya-ss/sd-scripts |
I have same problem and using transformers=4.16 did not help |
When you comment out this line, the dimension 9 will be 3, so it can run. But this is not the beam search since you just keep one result! |
in order to solve this problem you need to set num_beams=1 not 3. (for instance in blip_vqa.py line 92) |
I solved this problem, if the transformers is 4.16.0, everything is ok. But I used the transformers4.36.2, in this case, in the 818 lines of the generation_utils.py of transformers: |
You should submit a PR to Koby’s in his sd-scripts repo to fix it for good. |
Updating to 1.0.2 fixed it for me. |
Commenting out these two lines may work: Lines 131 to 132 in 3a29b74
EDIT: After commenting I noticed yenlianglai had already written. The recent transformers seems to do |
I used Transformers==4.17 and did not face further issues |
When I use beam search to generate caption for a picture on Colab, this error occurs. My transformers version is 4.25.1. And it works when I use nucleus sampling. How should I solve this
The text was updated successfully, but these errors were encountered: