Manifolds, Random Matrices and Spectral Gaps: The geometric phases of generative diffusion