Depending on the context, a scheduler defines how to iteratively add noise to an image or how to update a sample based on a model's output:  
- during *training*, a scheduler adds noise (there are different algorithms for how to add noise) to a sample to train a diffusion model
- during *inference*, a scheduler defines how to update a sample based on a pretrained model's output