# End-to-End Inference Trace

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 the whole pipeline as a trace from config to output media.

## Annotated sketch

```text
## End-to-end trace

1. Read config and load components.
2. Encode text/image/video conditions.
3. Initialize or encode latents.
4. Run scheduler loop with denoiser and guidance.
5. Decode latents and postprocess media.
```

## What to explain

- load creates modules.
- prepare creates conditions and latents.
- loop updates latents.
- decode emits output.

## Common trap

- Do not explain only the model family name.
- Do not skip scheduler and VAE when tracing output.
