Skip to content

Support tiled encode/decode for AutoencoderTiny#4627

Merged
sayakpaul merged 6 commits into
huggingface:mainfrom
Isotr0py:tae
Aug 18, 2023
Merged

Support tiled encode/decode for AutoencoderTiny#4627
sayakpaul merged 6 commits into
huggingface:mainfrom
Isotr0py:tae

Conversation

@Isotr0py

Copy link
Copy Markdown
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
Comment thread src/diffusers/models/autoencoder_tiny.py Outdated
Comment thread tests/models/test_models_vae.py Outdated

@sayakpaul sayakpaul left a comment

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown

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

@sayakpaul sayakpaul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sweet!

@sayakpaul

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@sayakpaul

Copy link
Copy Markdown
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