Skip to content

Conversation

Aniketsy
Copy link

#40853
This PR fixes a bug that prevented DETA object detection models from loading in recent Transformers versions due to a device/dtype mismatch when initializing self.class_embed.bias.data. The fix ensures the tensor is created on the correct device and with the correct dtype, resolving error .

Please let me know if my approach or fix needs any improvements . I’m open to feedback and happy to make changes based on suggestions.
Thankyou !

@Rocketknight1
Copy link
Member

I think this is a duplicate of #40878 !

@Aniketsy
Copy link
Author

@Rocketknight1 Thanks ! Should I close this PR.

@Rocketknight1
Copy link
Member

Yeah, I'll close it. Thanks for the PR anyway - your fix was good, it's just unfortunate that someone at Hugging Face was working on it too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants