<hfoptions id="lcm-t2i">
<hfoption id="LCM">  
Load a T2IAdapter trained on canny images and pass it to the [`StableDiffusionXLAdapterPipeline`]. Then load a LCM checkpoint into [`UNet2DConditionModel`] and replace the scheduler with the [`LCMScheduler`]. Now pass the canny image to the pipeline and generate an image.  
```python
import torch
import cv2
import numpy as np
from PIL import Image