s much slower due to the iterative nature of the process. The UNet component of the pipeline runs several times (as many as num_inference_steps); each time, the different submodules of the UNet are sequentially onloaded and then offloaded as they are needed, so the number of memory transfers is large.
Consider using model offloading as another point in the optimization space: it will be much faster, but memory savings won't be as large.

It is 