loat16. Furthermore, in our experiments, we bfloat16 to be much more resilient when used with quantization in comparison to float16. We have a dedicated guide for running inference in a reduced precision.  Running attention efficiently Attention blocks are intensive to run. But with PyTorch’s scaled_dot_product_attention, we can run them efficiently.   Copied from diffusers import StableDiffusionXLPipeline
import torch

pipe = StableDiffusionXL