How do you train a diffusion model? What is the step-by-step process, and what is the required installation environment?