Skip to content

Conversation

@MHRDYN7
Copy link
Contributor

@MHRDYN7 MHRDYN7 commented Dec 7, 2024

This PR solves the batch size issue with FlaxDinov2 model #34611. The commonly used tests across the transformers library could not detect the error in the "interpolate_position_encoding" method, which only worked for single images. The issue has been fixed using jnp.tile for it's simplicity, although jnp.repeat could also be used.
The slow tests have also been modified to pass a batch of images instead of just one.

@amyeroberts could you please review the changes.

P.S. this pr does exactly what #34620 aimed to do, however, with a few more improvements.

@MHRDYN7 MHRDYN7 changed the title addressing the issue #34611 to make FlaxDinov2 compatible for any batch size addressing the issue #34611 to make FlaxDinov2 compatible with any batch size Dec 7, 2024
@MHRDYN7
Copy link
Contributor Author

MHRDYN7 commented Dec 24, 2024

@NielsRogge, since you've been working on Dinov2 registers recently, can I please request a quick review on this one as well?

@MHRDYN7
Copy link
Contributor Author

MHRDYN7 commented Feb 23, 2025

@gante I'm not really sure who is currently working on flax in the hf team, could you please mention the right person? Need a quick review to merge this

Copy link
Contributor

@gante gante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look reasonable to me, thank you for having a look at the issue 🤗 And thank you for modifying the tests to prevent regressions 🙌

@gante gante merged commit d80d52b into huggingface:main Feb 25, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants