-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tidy
SilenceWarnings
context manager (#6493)
## 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)_
- Loading branch information
Showing
4 changed files
with
169 additions
and
184 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.