“We could collect photos with descriptions. For a dog in a red hat, give the model both the photo and those words. If it practices reading descriptions during training, we can tell it what we want during generation.”
Lumi wants to add an input: besides the image, the model should read a general condition, such as a class or text prompt, denoted by . Write a clean image as . Training data then consists of pairs , and the model learns how images are distributed given a description:
Here denotes the generative model’s parameters. For continuous images, is a probability density, not the probability of drawing one exact image. Given “a dog in a red hat,” images matching that description should receive higher density.
Providing the condition during training so the model learns to generate accordingly is called conditional training. This does not mean retraining for every new prompt: a model that has learned text inputs may combine descriptions it has never seen together. Our original model, however, lacks that input and needs to acquire this ability first.
Try the operation on a plot first. There are labelled samples per class. This toy model uses input to choose a Gaussian mean ; its learnable parameters both start at zero and the spread stays fixed. Learn the means, then change only and inspect the plot and parameters.