-
Notifications
You must be signed in to change notification settings - Fork 27.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DINOv2 with registers #35348
Add DINOv2 with registers #35348
Conversation
…to zach/Dino-v2-with-registers
Zach/dino v2 with registers
…rs_innovationcore
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! The drop path update might be a bit breaking, you can import the function in modular IMO
Thanks for review, revert the drop path update cause it wasn't need. Looks like we can merge :) One thing left: All model checkpoints are on the hub, would need to be transferred to the facebook org: https://huggingface.co/models?other=dinov2_with_registers (and then replace |
…rs_innovationcore
…rs_innovationcore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep feel free to merge in the meant time 🤗 thanks for updating !
@NielsRogge Would it be possible to adapt the transformers/src/transformers/models/dinov2/modeling_dinov2.py Lines 78 to 114 in 6e0515e
This current version has issues with tracing of the graph (see #33226). |
>>> configuration = model.config | ||
```""" | ||
|
||
model_type = "dinov2-with-registers-base" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a mismatch between the models on the hub and the model_type specified here. See https://huggingface.co/facebook/dinov2-with-registers-small/blob/main/config.json#L18, it is dinov2_with_registers
.
This causes an issue when loading the models and re-saving them (e.g., for finetuning or conversions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @ydshieh weird this wasn't caught by the tests, is this something we can add a test for?
What does this PR do?
This PR adds DINOv2 with registers, this time using the new modular tool.
Fixes #27379
To do: