Skip to content

Support tiled encode/decode for AutoencoderTiny #4627

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 6 commits into from
Aug 18, 2023

Conversation

Isotr0py
Copy link
Contributor

What does this PR do?

  • Support tiled encode/decode for AutoencoderTiny

Though taesd reduce VRAM cost compared with vae, it still cost large amount VRAM for encode/decode extremely large image since memory scales linearly with size of the latents.

According to my test, tiled-tae decoding only costs 1.2G VRAM with 64x64 tile.

The tile encode/decode are modified from the code presented in madebyollin/taesd#8.

Who can review?

Can you take a look at this? @sayakpaul

@Isotr0py Isotr0py changed the title Impl tae slicing and tiling Support tiled encode/decode for AutoencoderTiny Aug 16, 2023
Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Nice this looks good! Thank you!

@sayakpaul sayakpaul requested a review from yiyixuxu August 16, 2023 07:37
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Sweet!

@sayakpaul
Copy link
Member

Let's make sure the CI is green before merging :-)

@Isotr0py Isotr0py requested a review from sayakpaul August 17, 2023 02:29
@Isotr0py
Copy link
Contributor Author

I think the CI should be green this time. Can you approve the worflows? @sayakpaul

@sayakpaul
Copy link
Member

Thanks for your amazing contribution!

@sayakpaul sayakpaul merged commit 67ea2b7 into huggingface:main Aug 18, 2023
@Isotr0py Isotr0py deleted the tae branch August 18, 2023 04:51
keturn added a commit to invoke-ai/InvokeAI that referenced this pull request Sep 13, 2023
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* Impl tae slicing and tiling

* add tae tiling test

* add parameterized test

* formatted code

* fix failed test

* style docs
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* Impl tae slicing and tiling

* add tae tiling test

* add parameterized test

* formatted code

* fix failed test

* style docs
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