Closed erichan1 closed 1 year ago
Hi, thanks for posting this problem. I checked and find it is the problem due to the version of transformers
. Please try to install transformers<=4.24.0
then it should fix the bug. You can also refer to the example I create: https://colab.research.google.com/drive/1jwaHrHmF8RZ1m31jtzgWeccB55g1z0Z1?usp=sharing
Would love help fixing this - I can't run the example CLIP inference code on the example image on a clean google colab.
I opened a brand new colab, uploaded the example image into the colab filesystem, and ran the following code:
I get the following error:
I solved this and a subsequent padding error by turning off rgb conversion and padding:
I convert the grayscale example image into RGB manually using example_image.convert('RGB'), converting it to numpy, and moving the channels dim from last dim to first dim because model expects channels-first.
But then we get a new issue where all the pixel_values become inf and nan after the processor is called on the inputs.