+ pipe.enable_xformers_memory_efficient_attention() Enable torch.compile if you’re using PyTorch >= 2.0 to automatically use scaled dot-product attention (SDPA):   Copied   pipe.unet.to(memory_format=torch.channels_last)