transforms.CenterCrop(args.resolution),
transforms.ToTensor(),
]
)
```  
Within the [`main()`](https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/controlnet/train_controlnet.py#L713) function, you'll find the code for loading the tokenizer, text encoder, scheduler and models. This is also where the ControlNet model is loaded either from existing weights or randomly initialized from a UNet:  
```py
if args.controlnet_model_name_or_path: