Skip to content

AutoencoderKL: clamp indices of blend_h and blend_v to input size #2660

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 1 commit into from
Mar 14, 2023

Conversation

kig
Copy link
Contributor

@kig kig commented Mar 13, 2023

Prevents out-of-bounds indexing in blend_h and blend_v in AutoencoderKL when using tiled_decode.

Fix for #2646

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 13, 2023

The documentation is not available anymore as the PR was closed or merged.

@@ -445,6 +445,12 @@ def test_stable_diffusion_vae_tiling(self):

assert np.abs(output_2.images.flatten() - output_1.images.flatten()).max() < 5e-1

# test that tiled decode works with various shapes
shapes = [(1, 4, 73, 97), (1, 4, 97, 73), (1, 4, 49, 65), (1, 4, 65, 49)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome addition to the test!

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Super cool! Thanks a lot @kig :-)

@patrickvonplaten patrickvonplaten merged commit a7cc468 into huggingface:main Mar 14, 2023
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
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.

3 participants