transformers icon indicating copy to clipboard operation
transformers copied to clipboard

Enable ONNX export for `VisionDecoderEncoderModel`

Open lewtun opened this issue 2 years ago • 10 comments

🚀 Feature request

As discussed on the forums, it would be nice if one could export VisionDecoderEncoderModel classes using the transformers.onnx package.

Motivation

It is currently not possible to export VisionDecoderEncoderModel classes (or vision models more generally), unless the end user is willing to write their own OnnxConfig. It might make sense to first explore what is involved in exporting ViT before tackling this more complex example.

Looking at this a bit more closely, I can see that transformers.onnx currently has a tight integration with tokenizers (e.g. to generate dummy inputs), so some refactoring will be necessary to support other modalities.

lewtun avatar Dec 17 '21 12:12 lewtun

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Jan 16 '22 15:01 github-actions[bot]

I believe progress on this ticket will be welcome by the communitiy.

albertoandreottiATgmail avatar Mar 10 '22 20:03 albertoandreottiATgmail

Hey @albertoandreottiATgmail thanks for the interest! This is next up on my list now that we've just merged the ViT export in #15658 :)

lewtun avatar Mar 10 '22 20:03 lewtun

Hey @albertoandreottiATgmail thanks for the interest! This is next up on my list now that we've just merged the ViT export in #15658 :)

Hi @lewtun is there any way (or script) to export trocr to onnx ?

IlyasMoutawwakil avatar Jun 03 '22 08:06 IlyasMoutawwakil

Hi all, any updates on this? I've also tried to convert TrOCR to ONNX without success. Thanks in advance :) cc @lewtun

tanmayjain98 avatar Jun 29 '22 20:06 tanmayjain98

Re-opening this issue as it hasn't been resolved yet

NielsRogge avatar Aug 24 '22 08:08 NielsRogge

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Sep 17 '22 15:09 github-actions[bot]

Adding another feature request for this: https://github.com/NielsRogge/Transformers-Tutorials/issues/183

NielsRogge avatar Sep 19 '22 16:09 NielsRogge

Adding another feature request for this: NielsRogge/Transformers-Tutorials#183

Any updates on this one?

Thank you

BakingBrains avatar Sep 23 '22 06:09 BakingBrains

Hi folks, @mht-sharma will be tackling this issue - stay tuned :)

lewtun avatar Sep 23 '22 09:09 lewtun

@mht-sharma Any updates?

Thank you.

BakingBrains avatar Sep 30 '22 08:09 BakingBrains

@BakingBrains you can see the PR from @mht-sharma linked above - we should be able to get this merged pretty soon!

lewtun avatar Oct 04 '22 14:10 lewtun

@lewtun and @mht-sharma Thank you.

BakingBrains avatar Oct 06 '22 02:10 BakingBrains