Image Generation Using Diffusion
We learned how to generate images using GANs in Chapter 9, Deep Convolutional GANs. In this chapter, we will explore a more recent approach to generating images – by using diffusion. The idea behind diffusion, just like all great ideas, is pretty simple and intuitive. We will first understand how diffusion works. We will then use PyTorch to train a diffusion model from scratch to generate realistic images. We will then further our understanding of diffusion for generating images from text. Finally, we will generate some high-quality, realistic images from text using a pre-trained diffusion model with the help of PyTorch and Hugging Face.
By the end of this chapter, you will understand the core idea behind most of the cutting-edge generative AI models in computer vision, such as Stable Diffusion, DALL-E, Imagen, Midjourney, and so on. You will learn how to train a diffusion model from scratch using PyTorch, and how to use cutting-edge diffusion...