Memory and speed
	
We present some techniques and ideas to optimize 🤗 Diffusers inference for memory or speed. As a general rule, we recommend the use of xFormers for memory efficient attention, please see the recommended installation instructions.
We’ll discuss how the following settings impact performance and memory.

Latency
Speedup
original
9.50s
x1
cuDNN auto-tuner
9.37s
x1.01
fp16
3.61s
x2.63
channels last
3.30s
x2.88
traced UNet
3.21s
x2