liveBook · Manning

Timestep

As explained in Build a Text-to-Image Generator (from Scratch)

A time step is a discrete stage in the diffusion process at which a particular noise level is applied.

A timestep is a discrete stage in a diffusion process. It identifies the noise level applied while transforming clean data into random noise, or while reversing that transformation through denoising. section 1.3.1

A timestep gives the diffusion process an ordered position:

  • At timestep 0, the image is clean. section 1.3.1
  • During forward diffusion, each successive timestep adds a controlled amount of noise; by timestep T, commonly 1,000, the image becomes approximately pure random noise. section 5.1.1
  • During reverse diffusion, denoising proceeds from timestep T back toward timestep 0. section 1.3.1

The timestep determines how much noise is mixed into an image. With a reparameterized formulation, an image can be sampled directly at an arbitrary timestep t rather than generating every earlier noisy image. section 5.1.1

A denoising U-Net receives both a noisy image and its timestep, predicts the injected noise, and learns across randomly selected timesteps ranging from 1 through 1,000. section 5.3.1

Visualizing timestep progression

A DDIM scheduler can add noise at timesteps 0, 200, 400, 600, 800, and 1,000, then display the resulting images. The sequence makes the increasing noise level visible and supports a 4 × 5 grid exercise using timesteps 0, 250, 500, 750, and 1,000. section 7.2.2

Figure 1.6 In the forward diffusion process, we start with a clean image from the training set, x0, and add noise ε0 to it to form a noisy image x1, which is a weighted sum of x0 and ε0. We repeat this process for 1,000 time steps until the image x1,000 becomes random noise.
A diagram of a dog

AI-generated content may be incorrect.

Use the diffusion diagram to trace how a clean image becomes random noise across ordered timesteps. section 1.3.1

How Build a Text-to-Image Generator (from Scratch) covers it

How deep it goes
Explains timestep ordering, noise weighting, arbitrary-time sampling, and training use, but does not detail timestep-embedding internals.
Examples
Uses dog images, clothing-item batches, and flower images visualized at selected noise levels.
What it assumes
Assumes familiarity with images and noise while establishing forward and reverse diffusion from clean data and random noise.
What you can do after
Apply it via a DDIMScheduler to add noise at selected timesteps and inspect the resulting diffusion stages.
How it connects
Connects timesteps to forward diffusion, reverse diffusion, denoising U-Nets, reparameterization, and DDIM noise schedulers.

Also explained in

Compare how 5 books explain timestep →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Text-to-Image Generator (from Scratch). The section links point to the parts of the book it draws on.