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
FirstBlockCache
FirstBlockCache
class max.pipelines.diffusion.FirstBlockCache(dtype, device)
Bases: object
Standalone FirstBlockCache module.
Provides state allocation for FBCache. The conditional execution
helpers (can_use_fbcache, fbcache_conditional_execution)
remain in cache.py since they are used directly inside
transformer _forward_fbcache methods.
create_state()
create_state(batch_size, seq_len, residual_dim, output_dim)
Allocate fresh per-request FirstBlockCache state tensors.
-
Parameters:
-
Return type:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!