-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Correction for non-integral image resolutions with quantizations other than float32 #7356
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
Correction for non-integral image resolutions with quantizations other than float32 #7356
Conversation
| x = torch.nn.functional.interpolate( | ||
| x.float(), skip.shape[-2:], mode="bilinear", align_corners=True | ||
| ) | ||
| x = x.type(orig_type) |
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.
Could we use x = x.to(orig_dtype) just to be consistent with how casting in done in other parts of the library.
DN6
left a comment
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.
Thanks for catching! Could we add a similar casting operation to the training section as well.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
Thanks for the suggestions, I've changed the casting call and added the same code in the corresponding training location. |
|
@DN6 good to merge? |
DN6
left a comment
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 👍🏽
What does this PR do?
For Stable Cascade:
Adds support for non-integral image resolutions (I.e. not divisible by 32) when the model quantization choice is other than float32 (I.e. using bfloat16 et al.)
Fixes #7355
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@sayakpaul @yiyixuxu @DN6