-
Notifications
You must be signed in to change notification settings - Fork 486
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 ONNX export support for DinoV2, Hiera, Maskformer, PVT, SigLIP, SwinV2, VitMAE, and VitMSN models #2001
Conversation
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. |
@xenova Hi xenova! I think you missed to add official support for maskformer optimum/optimum/onnxruntime/modeling_ort.py Line 1773 in de07c7a
|
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.
Apologies for the delay @xenova !! Looks so good, thanks for adding so many new models ❤️
optimum/exporters/tasks.py
Outdated
"feature-extraction", | ||
"masked-im", |
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.
I think "image-feature-extraction"
(or "feature-extraction"
) should be enough https://huggingface.co/datasets/huggingface/transformers-metadata/blob/main/pipeline_tags.json#L1128
"feature-extraction", | |
"masked-im", | |
"feature-extraction", |
if not the correct class needed to load the model can be added to _CUSTOM_CLASSES
: for vit-mae I only see AutoModel
or AutoModelForPreTraining
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.
removed in 7a2e94a
optimum/exporters/tasks.py
Outdated
"vit-msn": supported_tasks_mapping( | ||
"feature-extraction", | ||
"image-classification", | ||
"masked-im", |
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.
same I think can be removed :
"masked-im", |
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.
removed in 01929b2
Also seems there is an issue for Maskformer for the feature-extraction task
the expected output name seems to be "transformer_decoder_last_hidden_state" https://github.com/huggingface/transformers/blob/69e31eb1bf123d5bd0183b753da83ab7dd9c2eec/src/transformers/models/maskformer/modeling_maskformer.py#L1615 while feature-extraction gives "last_hidden_state", can be fixed by updating edit : should be fixed with 3fa346c |
Thanks so much @echarlaix! 🚀 |
What does this PR do?
Fixes # (issue)
Before submitting
Who can review?