The Gaussian Latent Machine: Efficient Prior and Posterior Sampling for Inverse Problems