Yushi-Hu / PromptCap

natual language guided image captioning
73 stars 7 forks source link

Fix IndexError when using batch of prompts and batch of images #2

Closed JonathanRayner closed 1 year ago

JonathanRayner commented 1 year ago

Currently passing a batch of prompts and a batch of images raises an Index error in OFA.

This was raised upstream in #226 and fixed in this commit.

This PR just carries out the same fix here.

Testing: commenting out the line to match upstream generates batches of captions from OFA with no IndexError, as expected