IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Python class

FirstBlockCacheState

FirstBlockCacheStateโ€‹

class max.pipelines.diffusion.FirstBlockCacheState(prev_residual=None, prev_output=None)

source

Bases: object

Per-request mutable state for FirstBlockCache.

Allocated fresh for each denoising request via FirstBlockCache.create_state().

Parameters:

prev_outputโ€‹

prev_output: Tensor | None = None

source

Full transformer output from the previous step.

prev_residualโ€‹

prev_residual: Tensor | None = None

source

First-block output residual from the previous step.