diffusers
bd78f63a - Reduce peak VRAM by releasing large attention tensors (as soon as they're unnecessary) (#3463)

Comment changes are shownComment changes are hidden
Commit
2 years ago
Reduce peak VRAM by releasing large attention tensors (as soon as they're unnecessary) (#3463) Release large tensors in attention (as soon as they're no longer required). Reduces peak VRAM by nearly 2 GB for 1024x1024 (even after slicing), and the savings scale up with image size.
Author
Parents
  • src/diffusers/models
    • File
      attention_processor.py