Diffusion Model Training Code Structure