pipeline = HunyuanDiTPipeline.from_pretrained(
"Tencent-Hunyuan/HunyuanDiT-Diffusers", torch_dtype=torch.float16
).to("cuda")
```  
Then change the memory layout of the pipelines `transformer` and `vae` components to `torch.channels-last`:  
```python
pipeline.transformer.to(memory_format=torch.channels_last)
pipeline.vae.to(memory_format=torch.channels_last)
```  
Finally, compile the components and run inference:  
```python