 The initial warmup step takes longer because the model needs to be compiled and optimized. However, subsequent calls to the pipeline on an input with the same length as the original prompt are much faster because it can reuse the optimized graph.   Copied from diffusers import DiffusionPipeline
import torch
import torch_xla.core.xla_model as xm

device = xm.xla_device()
pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion