pipeline.vae.to(memory_format=torch.channels_last)
```  
Finally, compile the components and run inference:  
```python
pipeline.transformer = torch.compile(pipeline.transformer, mode="max-autotune", fullgraph=True)
pipeline.vae.decode = torch.compile(pipeline.vae.decode, mode="max-autotune", fullgraph=True)