Signed-off-by: samithuang <285365963@qq.com> Signed-off-by: SamitHuang <285365963@qq.com> Signed-off-by: Samit <285365963@qq.com> Co-authored-by: Jiangyun Zhu <riverclouds.zhu@qq.com>
28 lines
870 B
Python
28 lines
870 B
Python
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
"""
|
|
Cache module for diffusion model inference acceleration.
|
|
|
|
This module provides a unified cache backend system for different caching strategies:
|
|
- TeaCache: Timestep Embedding Aware Cache for adaptive transformer caching
|
|
- cache-dit: DBCache, SCM, and TaylorSeer caching strategies
|
|
|
|
Cache backends are instantiated directly via their constructors and configured via OmniDiffusionConfig.
|
|
"""
|
|
|
|
from vllm_omni.diffusion.cache.base import CacheBackend
|
|
from vllm_omni.diffusion.cache.teacache import (
|
|
CacheContext,
|
|
TeaCacheConfig,
|
|
apply_teacache_hook,
|
|
)
|
|
from vllm_omni.diffusion.cache.teacache.backend import TeaCacheBackend
|
|
|
|
__all__ = [
|
|
"CacheBackend",
|
|
"TeaCacheConfig",
|
|
"CacheContext",
|
|
"TeaCacheBackend",
|
|
"apply_teacache_hook",
|
|
]
|