The main() function contains the code for preparing the dataset and training the model. One of the main differences you’ll notice right away is that the training script also loads a CLIPImageProcessor - in addition to a scheduler and tokenizer - for preprocessing images and a CLIPVisionModelWithProjection model for encoding the images:   Copied noise_scheduler = DDPMScheduler(beta_schedule="squaredcos_cap_v2", prediction_type="sample")