  image = pipe(prompt).images[0]  torch.compile The torch.compile function can often provide an additional speed-up to your PyTorch code. In 🤗 Diffusers, it is usually best to wrap the UNet with torch.compile because it does most of the heavy lifting in the pipeline.   Copied from diffusers import DiffusionPipeline