vllm_omni.diffusion.cache.cachedit.backend ¶
Generic Cache-DiT backend lifecycle and integration.
CacheDiTEnabler module-attribute ¶
CacheDiTEnabler: TypeAlias = Callable[
[Any, DiffusionCacheConfig],
RefreshCacheContextFunc | CacheDiTEnableResult,
]
RefreshCacheContextFunc module-attribute ¶
CacheDiTBackend ¶
Bases: CacheBackend
Manage Cache-DiT through the common diffusion cache lifecycle.
disable ¶
disable(pipeline: SupportsComponentDiscovery) -> None
Remove Cache-DiT hooks so later requests use native forwards.
refresh ¶
refresh(
pipeline: SupportsComponentDiscovery,
num_inference_steps: int,
verbose: bool = True,
) -> None
CacheDiTEnableResult dataclass ¶
Custom-enabler result with the exact targets needed for teardown.
cache_summary ¶
cache_summary(
pipeline: SupportsComponentDiscovery,
details: bool = True,
) -> None
Log Cache-DiT statistics for every transformer on the pipeline.
enable_cache_for_dit ¶
enable_cache_for_dit(
pipeline: SupportsComponentDiscovery,
cache_config: DiffusionCacheConfig,
block_adapter: BlockAdapter | None = None,
adapter_cls: type[CachedAdapter] | None = None,
get_pipeline_transformer: Callable[
[SupportsComponentDiscovery], Module
] = _default_get_pipeline_transformer,
) -> RefreshCacheContextFunc
Enable Cache-DiT for a standard single-transformer DiT pipeline.