liveBook · Manning

Image generation model

As explained in Deep Learning with Python, Third Edition

A model that generates images, here assumed to operate at large scale and potentially use ViT-style architectures.

An image generation model learns a latent visual space and samples from it to create new images, including images that interpolate between real examples. section 17.0

Diffusion models generate images by repeatedly denoising pure noise; conditioning that process on text produces images matching captions. section 17.4

Choose the model family according to the task:

  • Use diffusion models for highly realistic generation and text-guided synthesis. section 17.4
  • Use variational autoencoders for structured, continuous latent spaces supporting image editing and animation. section 17.4
  • Treat GANs as an established alternative that has largely been displaced by diffusion models in recent practice. section 17.1.1

Training an unconditioned diffusion model

Train a diffusion model on flower images, then sample generated flowers after 100 epochs. Continue training to obtain increasingly realistic results; add text conditioning to move toward caption-controlled generation. section 17.2.7

model = DiffusionModel(image_size, widths=[32, 64, 96, 128], block_depth=2)
model.normalizer.adapt(dataset)                                       #1

Inspect the diffusion-model construction and dataset normalization used before training. section 17.2.7

How Deep Learning with Python, Third Edition covers it

How deep it goes
Explains latent spaces, compares model families, and demonstrates diffusion training, but stops short of detailed architecture internals.
Examples
Uses generated flowers, imaginary images, latent-space interpolation, image editing, and language-guided generation.
What you can do after
Build it from scratch with diffusion training, or operate a pretrained text-to-image model for realistic image synthesis.
How it connects
Connects diffusion models, variational autoencoders, GANs, latent spaces, and text conditioning.

Also explained in

Compare how 2 books explain image generation model →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with Python, Third Edition. The section links point to the parts of the book it draws on.