# Scheduler Reading

This starter is annotated reading material and the source of truth for the lab preview. Running anything is optional; the reading goal is to explain the mechanism without hiding behind a framework call.

## Reading focus

Read scheduler configuration as the time axis and update rule of inference.

## Annotated sketch

```text
## Scheduler call sequence

1. `scheduler.set_timesteps(num_inference_steps)`
2. `latent_model_input = scheduler.scale_model_input(latents, t)`
3. `noise_pred = denoiser(latent_model_input, t, condition)`
4. `latents = scheduler.step(noise_pred, t, latents).prev_sample`
```

## What to explain

- set_timesteps creates the inference schedule.
- scale_model_input adapts latents before the denoiser.
- step maps prediction to the next latent.

## Common trap

- Scheduler is not just a loop counter.
- Training noise schedule and inference scheduler are related but not identical.
