Diffusion model in 1D