izer", revision=args.revision
) Then the script loads the UNet model:   Copied load_model = UNet2DConditionModel.from_pretrained(input_dir, subfolder="unet")
model.register_to_config(**load_model.config)

model.load_state_dict(load_model.state_dict()) Next, the text and image columns of the dataset need to be preprocessed. The tokenize_captions function handles tokenizing the inputs, and the train_transforms function specifies the type of trans