The Step It Actually Takes

Diffusion ModelsMedium+20 XP+20

The Step It Actually Takes

Generation is the forward process run backwards: the network predicts the noise, you subtract most of it, and you have moved one step back along the chain. With guidance switched on, the network is run twice at every step — once with the prompt attached, once with nothing — and the two predictions are combined before anything gets subtracted.

Follow a single number inside the latent through two steps of a toy sampler. Write uuu for the unconditioned prediction and ccc for the conditioned one. Each step is two operations, in this order:

  1. Combine the two runs — start at the unconditioned prediction and push along the gap towards the conditioned one, by a factor equal to the guidance scale ggg:

guided=u+g (c−u)\text{guided} = u + g\,(c - u)guided=u+g(c−u)

  1. Subtract the share kkk of that guided prediction which the schedule allots to this step:

z←z−k×guidedz \leftarrow z - k \times \text{guided}z←z−k×guided

The latent value starts at z=1.50z = 1.50z=1.50, the guidance scale is g=5g = 5g=5, and the sampler takes two steps:

stepuuuccckkk
first0.300.300.300.500.500.500.400.400.40
second0.200.200.200.440.440.440.250.250.25

What is zzz after the second step?

Round your answer to 2 decimal places.

Run the network with the condition

The difference between the two predictions points in the direction the condition is asking for. Exaggerate that direction and the condition gets obeyed harder.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.