-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix DEFAULT_PRECISION
handling
#6492
Merged
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
4 tasks
lstein
reviewed
Jun 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.
Looks good to me so far.
68ab579
to
52c0c4a
Compare
76c97ec
to
320dacb
Compare
@lstein This is ready for a full review now. |
lstein
approved these changes
Jun 13, 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.
Very straightforward. Looks good.
…RECISION is a torch.dtype. Previously, it was compared to a str in a number of places where it would always resolve to False. This is a bugfix that results in a change to the default behavior. In practice, this will not change the behavior for many users, because it only causes a change in behavior if a users has configured float32 as their default precision.
320dacb
to
9631b9d
Compare
hipsterusername
approved these changes
Jun 14, 2024
RyanJDick
added a commit
that referenced
this pull request
Jun 18, 2024
## Summary No functional changes, just cleaning some things up as I touch the code. This PR cleans up the `SilenceWarnings` context manager: - Fix type errors - Enable SilenceWarnings to be used as both a context manager and a decorator - Remove duplicate implementation - Check the initial verbosity on `__enter__()` rather than `__init__()` - Save an indentation level in DenoiseLatents ## QA Instructions I generated an image to confirm that warnings are still muted. ## Merge Plan - [x]⚠️ Merge #6492 first, then change the target branch to `main`. ## Checklist - [x] _The PR has a short but descriptive title, suitable for a changelog_ - [x] _Tests added / updated (if applicable)_ - [x] _Documentation added / updated (if applicable)_
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
DEFAULT_PRECISION
is atorch.dtype
. Previously,DEFAULT_PRECISION
was compared to astr
("float32"
) in several places to determine the default precision for an invocation. Due to the type mismatch, these comparisons would always resolve toFalse
. This PR fixes all of these comparison type mismatches.This is a bugfix that results in a change to the default behaviour. In practice, this should not change the behaviour for many users, because it only causes a change for users that have configured float32 as their default precision (or have an old GPU without float16 support).
QA Instructions
precision: float32
and confirm that the affected invocations default to float32.Merge Plan
main
before merging.Checklist