Skip to content
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

The cost of consistency decoder #5761

Closed
Luciennnnnnn opened this issue Nov 11, 2023 · 3 comments
Closed

The cost of consistency decoder #5761

Luciennnnnnn opened this issue Nov 11, 2023 · 3 comments
Labels
question Further information is requested stale Issues that haven't received updates

Comments

@Luciennnnnnn
Copy link
Contributor

Describe the bug

I replace original VAE decoder of a stable diffusion model with Consistency Decoder, then CUDA out of memory occurs. My question is that How large of Consistency Decoder is compared to original VAE decoder.

  • diffusers version: 0.23.0
  • Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35
  • Python version: 3.10.11
  • PyTorch version (GPU?): 2.0.0+cu118 (True)
  • Huggingface_hub version: 0.17.3
  • Transformers version: 4.34.0
  • Accelerate version: 0.23.0
  • xFormers version: 0.0.18
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?:

Reproduction

Decode a large latent

Logs

No response

System Info

..

Who can help?

No response

@Luciennnnnnn Luciennnnnnn added the bug Something isn't working label Nov 11, 2023
@eeyrw
Copy link

eeyrw commented Nov 11, 2023

According my observation the consistency decoder uses an UNet2D module in the VAE and does diffusion. That is where huge VRAM cost and latency from. According my test it costs ~16G VRAM when decoding the latent with target size 1024*1024.

@patrickvonplaten patrickvonplaten added question Further information is requested and removed bug Something isn't working labels Nov 13, 2023
@patrickvonplaten
Copy link
Contributor

Hey @Luciennnnnnn,

I recommend to read a bit through the original paper: https://github.com/openai/consistencydecoder

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Dec 26, 2023
@github-actions github-actions bot closed this as completed Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested stale Issues that haven't received updates
Projects
None yet
Development

No branches or pull requests

3 participants