What Is Left to Speed Up

Diffusion ModelsHard+30 XP+30

What Is Left to Speed Up

Slow sampling was diffusion's one real weakness, and distilling many steps into a model that needs only a few is one of the ways that gap has been closed. This is what it does to a stopwatch.

A latent-diffusion tool generates one image on one machine. Three parts do the work, and they do not run the same number of times.

partcost of one run
text encoder404040 ms
denoiser — one pass over the latent181818 ms
decoder — latent to pixels120120120 ms

The text encoder runs once per image and the decoder runs once per image, whatever the sampler does in between.

Setup A — the default. 505050 sampling steps with classifier-free guidance switched on, so the denoiser is run twice at every step.

Setup B — a distilled sampler. 444 sampling steps, and guidance has been baked into the distilled model, so the denoiser is run once at every step.

How many times faster is setup B at producing one finished image, end to end?

Round your answer to 2 decimal places.

encode the prompt into vectors
start from a random latent
predict the noise, with and without the prompt
step towards the prompt, and subtract
repeat for the whole schedule
decode the latent into an image

Prompt in, image out. Nothing hidden.

Hints

Solve it to unlock the solution

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