liveBook · Manning

Image generation

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

Image synthesis is the computational generation of new images from learned representations or specified conditions.

Image generation computationally synthesizes new images from learned representations or specified conditions. Diffusion models begin with random noise and iteratively denoise it into an image resembling the training distribution. section 7.4 section 10.1

A diffusion generation pipeline typically proceeds as follows:

  • Set an inference schedule, such as 50 descending time steps. section 7.4

Initial noise determines the result: different tensors produce different images, while interpolating between tensors creates a visual transition between two generated images. Unconditional models generate without labels; conditional models can align outputs with labels or text prompts. section 7.4.1 section 6.4.1

Prompt-controlled generation

Stable Diffusion converts prompts such as “an astronaut in a spacesuit riding a unicorn” into coherent images. Prompt batches create image grids, while width, height, and guidance scale adjust the generation; larger batches and resolutions require more GPU memory. section 10.1

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

How deep it goes
Traces noise initialization, 50-step denoising, scheduler updates, interpolation, prompting, resolution, and memory trade-offs.
Examples
Demonstrates labeled digits, generated flowers, interpolated images, and prompt-driven astronauts, animals, cities, and dogs.
What it assumes
Assumes trained model weights and tensors while demonstrating generation from random noise without requiring labels for unconditional models.
What you can do after
Apply diffusion models through PyTorch functions or the diffusers StableDiffusionPipeline to generate and compare images.
How it connects
Connects diffusion models with denoising U-Nets, noise tensors, interpolation, text conditioning, and classifier-free guidance.

Also explained in

Compare how 6 books explain image generation →

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.