2025-12-12 09:59:56 +05:30
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
|
|
|
"""
|
|
|
|
|
Cache module for diffusion model inference acceleration.
|
|
|
|
|
|
2025-12-15 15:10:45 +08:00
|
|
|
This module provides a unified cache backend system for different caching strategies:
|
2025-12-12 09:59:56 +05:30
|
|
|
- TeaCache: Timestep Embedding Aware Cache for adaptive transformer caching
|
2025-12-15 15:10:45 +08:00
|
|
|
- cache-dit: DBCache, SCM, and TaylorSeer caching strategies
|
2025-12-12 09:59:56 +05:30
|
|
|
|
2025-12-15 15:10:45 +08:00
|
|
|
Cache backends are instantiated directly via their constructors and configured via OmniDiffusionConfig.
|
2025-12-12 09:59:56 +05:30
|
|
|
"""
|
|
|
|
|
|
2025-12-15 15:10:45 +08:00
|
|
|
from vllm_omni.diffusion.cache.base import CacheBackend
|
2025-12-12 09:59:56 +05:30
|
|
|
from vllm_omni.diffusion.cache.teacache import (
|
|
|
|
|
CacheContext,
|
|
|
|
|
TeaCacheConfig,
|
|
|
|
|
apply_teacache_hook,
|
|
|
|
|
)
|
2025-12-15 15:10:45 +08:00
|
|
|
from vllm_omni.diffusion.cache.teacache.backend import TeaCacheBackend
|
2025-12-12 09:59:56 +05:30
|
|
|
|
|
|
|
|
__all__ = [
|
2025-12-15 15:10:45 +08:00
|
|
|
"CacheBackend",
|
2025-12-12 09:59:56 +05:30
|
|
|
"TeaCacheConfig",
|
|
|
|
|
"CacheContext",
|
2025-12-15 15:10:45 +08:00
|
|
|
"TeaCacheBackend",
|
2025-12-12 09:59:56 +05:30
|
|
|
"apply_teacache_hook",
|
|
|
|
|
]
|