Manifold Generalization Provably Proceeds Memorization in Diffusion Models