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. |
ArthurZucker
left a comment
There was a problem hiding this comment.
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
ArthurZucker
left a comment
There was a problem hiding this comment.
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.
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.
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: