Skip to content
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

Register BaseOutput subclasses as supported torch.utils._pytree nodes #5459

Merged
merged 3 commits into from
Oct 24, 2023

Conversation

BowenBao
Copy link
Contributor

What does this PR do?

Identical to huggingface/transformers#25358, this PR should unblock the similar issue. Additionally, this, among other fixes, aims to unblock PT2 exports for models that outputs BaseOutput subclasses.

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 20, 2023

The documentation is not available anymore as the PR was closed or merged.

@DN6 DN6 self-assigned this Oct 20, 2023
@DN6 DN6 self-requested a review October 20, 2023 12:10
Copy link
Collaborator

@DN6 DN6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Can merge once CI is green 👍🏽

@DN6
Copy link
Collaborator

DN6 commented Oct 20, 2023

@BowenBao Could you run make style && make quality on your PR so the code QC checks pass.

@DN6 DN6 merged commit c7617e4 into huggingface:main Oct 24, 2023
11 checks passed
BowenBao added a commit to pytorch/pytorch that referenced this pull request Oct 24, 2023
…diffusers' in dynamo"


Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng

[ghstack-poisoned]
BowenBao added a commit to pytorch/pytorch that referenced this pull request Oct 24, 2023
…namo"


Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng

[ghstack-poisoned]
BowenBao added a commit to pytorch/pytorch that referenced this pull request Oct 26, 2023
…diffusers' in dynamo"


Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng

[ghstack-poisoned]
BowenBao added a commit to pytorch/pytorch that referenced this pull request Oct 26, 2023
…namo"


Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng

[ghstack-poisoned]
BowenBao added a commit to pytorch/pytorch that referenced this pull request Oct 27, 2023
…' and subclasses from 'diffusers' in dynamo"


Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng

[ghstack-poisoned]
BowenBao added a commit to pytorch/pytorch that referenced this pull request Oct 27, 2023
… from 'diffusers' in dynamo"


Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng

[ghstack-poisoned]
BowenBao added a commit to pytorch/pytorch that referenced this pull request Oct 30, 2023
…diffusers' in dynamo"


Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng

[ghstack-poisoned]
BowenBao added a commit to pytorch/pytorch that referenced this pull request Oct 30, 2023
…namo"


Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng

[ghstack-poisoned]
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Oct 30, 2023
Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.

Pull Request resolved: #111978
Approved by: https://github.com/jansel
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
…ch#111978)

Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.

Pull Request resolved: pytorch#111978
Approved by: https://github.com/jansel
kashif pushed a commit to kashif/diffusers that referenced this pull request Nov 11, 2023
…huggingface#5459)

* Register BaseOutput subclasses as supported torch.utils._pytree nodes

* lint

---------

Co-authored-by: Dhruv Nair <[email protected]>
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
…ch#111978)

Extending the workarounds for `transformers` `ModelOutput` to cover `diffusers` `BaseOutput`. Together with huggingface/diffusers#5459 it should unblock export for `diffusers` models.

Pull Request resolved: pytorch#111978
Approved by: https://github.com/jansel
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
…huggingface#5459)

* Register BaseOutput subclasses as supported torch.utils._pytree nodes

* lint

---------

Co-authored-by: Dhruv Nair <[email protected]>
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
…huggingface#5459)

* Register BaseOutput subclasses as supported torch.utils._pytree nodes

* lint

---------

Co-authored-by: Dhruv Nair <[email protected]>
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.

4 participants