Towards a unified framework for guided diffusion models