liveBook · Manning

Cosine noise schedule

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

A cosine diffusion schedule is a noise schedule whose clean-image and noise weights vary over time according to a cosine-based function.

A cosine noise schedule controls how much clean image and random noise contribute at each diffusion timestep. Compared with a linear schedule, it changes these weights more gradually, helping preserve detail early in the forward diffusion process. section 5.1.3 section 5.5

Visualizing forward diffusion

Apply linear and cosine schedules to bunny.png at timesteps 0, 166, 332, 498, 664, 830, and 996, then compare the resulting image grids.

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

How deep it goes
Explains cosine weights, contrasts their curves with linear weights, and implements noisy-image generation without detailing denoiser internals.
Examples
Uses plotted weight curves and successive noisy versions of a bunny image across seven timesteps.
What it assumes
Assumes familiarity with clean images, random noise, timesteps, and forward diffusion while introducing schedule behavior through code and plots.
What you can do after
Build it from scratch by computing cosine weights, plotting schedule behavior, and generating progressively noisy images.
How it connects
Connects forward diffusion with linear noise schedules, reverse diffusion, denoising, and U-Nets.

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.