None of your example code actually works

#7
by PeePants - opened

generated_text = model.generate(**inputs, image_size=[img.size],
TypeError: 'NoneType' object is not subscriptable

I can't get the example you have on the model card, OR the example you have in the demo notebook to work. I've followed all the instructions, even went back and installed the previous version of Transformers. I really wish that you all would at least try and test this kind of stuff before posting it here. I've just spent an hour trying to figure this out. Also, you link to some json file in your colab notebook which doesn't exist. Really frustrating. Could someone provide guidance on how to get this code working?

Salesforce org
edited May 24

Hi @PeePants , thanks for your interest in our work. After our release, the transformers library was updated. We are working on updating the inference code to make it compatible with the transformers stable release.

I really wish that you all would at least try and test this kind of stuff before posting it here.

I totally understand your frustration, but our team indeed did several rounds of sanity checks before releasing our code. The code we released indeed worked with transformers=4.41.0.dev0.

Also, you link to some json file in your colab notebook which doesn't exist.

The json file and images are indeed there. You can find them here: json and images.

Stay tuned for our updated inference code. Thanks.

Salesforce org

Hi @PeePants , we just updated the inference code to make it compatible with transformers==4.41.1. Please give it a try and let us know how it works. Thanks.

UncleFish changed discussion status to closed

Sign up or log in to comment