vllm_omni.diffusion.cache.stepcache.backend ¶
StepCache backend implementation.
This module provides the stepcache backend that implements the CacheBackend interface for DreamZero-style velocity-based step skipping in the denoise loop.
CUSTOM_STEPCACHE_ENABLERS module-attribute ¶
CUSTOM_STEPCACHE_ENABLERS = {
"DreamZeroPipeline": enable_dreamzero_stepcache
}
CUSTOM_STEP_CACHE_DIT_ENABLERS module-attribute ¶
CUSTOM_STEP_CACHE_DIT_ENABLERS = CUSTOM_STEPCACHE_ENABLERS
enable_dreamzero_step_cache_dit module-attribute ¶
enable_dreamzero_step_cache_dit = enable_dreamzero_stepcache
StepCacheBackend ¶
Bases: CacheBackend
Velocity cosine step-skipping cache backend for DreamZero.
Attaches :class:StepCacheConfig and :class:StepCacheState to supported pipelines. The denoise loop calls :meth:StepCacheState.should_run_step to decide whether to run predict_noise.
Example
from vllm_omni.diffusion.data import DiffusionCacheConfig backend = StepCacheBackend(DiffusionCacheConfig()) backend.enable(pipeline) backend.refresh(pipeline, num_inference_steps=16)
enable_dreamzero_stepcache ¶
enable_dreamzero_stepcache(
pipeline: Any, config: DiffusionCacheConfig
) -> None
Enable stepcache for DreamZeroPipeline.