>> dataset.set_transform(transform)
Feel free to visualize the images again to confirm that they’ve been resized. Now you’re ready to wrap the dataset in a DataLoader for training!


	Copied
>>> import torch

>>> train_dataloader = torch.utils.data.DataLoader(dataset, batch_size=config.train_batch_size, shuffle=True)

Create a UNet2DModel
	
Pretrained models in 🧨 Diffusers are easily created from their model class with the parameters you want. 