Skip to content

[docs] Add note in UniDiffusers Doc about PyTorch 1.X numerical stability issue #4703

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

Merged
merged 2 commits into from
Aug 22, 2023

Conversation

dg845
Copy link
Contributor

@dg845 dg845 commented Aug 21, 2023

What does this PR do?

This PR modifies the UniDiffuserPipeline docs to add a note regarding the fact that the UniDiffuser pipeline currently has numerical stability issues on PyTorch 1.X, which causes the output images to become all NaNs or all black. This issue can be mitigated by switching to PyTorch 2.X.

I will try to open a PR to address this issue in the near future, but in the meantime I think it makes sense to note this in the docs until the issue is fixed.

Addresses #3951.

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.

@patrickvonplaten
@sayakpaul

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Thanks for being proactive and for the warning! 🙂

Comment on lines 23 to 26
Tips:

- There is currently an issue on PyTorch 1.X where the output images are all black or the pixel values become `NaNs`. This issue can be mitigated by switching to PyTorch 2.X.

Copy link
Member

Choose a reason for hiding this comment

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

The doc-builder has a warning callout that is suited for a situation like this :)

Suggested change
Tips:
- There is currently an issue on PyTorch 1.X where the output images are all black or the pixel values become `NaNs`. This issue can be mitigated by switching to PyTorch 2.X.
<Tip warning={true}>
There is currently an issue on PyTorch 1.X where the output images are all black, or the pixel values become `NaNs`. This issue can be temporarily resolved by switching to PyTorch 2.X until a more permanent fix is implemented.
</Tip>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the docs to use the warning callout.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@dg845 dg845 changed the title Add note in UniDiffusers Doc about PyTorch 1.X numerical stability issue [docs] Add note in UniDiffusers Doc about PyTorch 1.X numerical stability issue Aug 21, 2023
@stevhliu stevhliu requested a review from sayakpaul August 21, 2023 23:20
Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Lovely!

@sayakpaul sayakpaul merged commit f75b8aa into huggingface:main Aug 22, 2023
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
…lity issue (huggingface#4703)

* Add note regarding UniDiffuser pipeline numerical stability issues on PyTorch 1.X

* Use the doc-builder warning tag.
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