d-ups and reductions in GPU memory usage. The most recent type of memory-efficient attention is Flash Attention (you can check out the original code at HazyResearch/flash-attention). If you have PyTorch >= 2.0 installed, you should not expect a speed-up for inference when enabling xformers. To use Flash Attention, install the following: PyTorch > 1.12 CUDA available xFormers Then call enable_xformers_memory_efficient_attention() on the pipeline