-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Flux Vae broke for float16, force bfloat16 or float32 were compatible #7213
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vargol
requested review from
lstein,
blessedcoolant,
brandonrising,
RyanJDick and
hipsterusername
as code owners
October 27, 2024 14:25
github-actions
bot
added
python
PRs that change python files
backend
PRs that change backend files
labels
Oct 27, 2024
brandonrising
approved these changes
Nov 6, 2024
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.
lgtm
hipsterusername
force-pushed
the
flux_vae_fp16_broke
branch
from
November 6, 2024 22:47
81e3001
to
496b02a
Compare
RyanJDick
requested changes
Nov 7, 2024
Added a bool to allow the node user to add noise in to initial latents (default) or to leave them alone.
github-actions
bot
added
invocations
PRs that change invocations
frontend
PRs that change frontend files
labels
Nov 7, 2024
I went ahead and made a small change in eaf4e08. Other than that, LGTM. I smoke tested text-to-image and image-to-image. |
RyanJDick
approved these changes
Nov 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backend
PRs that change backend files
frontend
PRs that change frontend files
invocations
PRs that change invocations
python
PRs that change python files
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The Flux VAE, like many VAEs, is broken if run using float16 inputs returning black images due to NaNs
This will fix the issue by forcing the VAE to run in bfloat16 or float32 were compatible
Related Issues / Discussions
Fix for issue #7208
QA Instructions
Tested on MacOS, VAE works with float16 in the invoke.yaml and left to default.
I also briefly forced it down the float32 route to check that to.
Needs testing on CUDA / ROCm
Merge Plan
It should be a straight forward merge,