1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

allow special cache ids only

This commit is contained in:
toilaluan
2025-11-15 05:13:33 +00:00
parent 7b4ad2de63
commit 51b4318a3e

View File

@@ -273,7 +273,7 @@ def apply_taylorseer_cache(module: torch.nn.Module, config: TaylorSeerCacheConfi
logger.debug(f"Special cache identifiers: {special_cache_identifiers}")
for name, submodule in module.named_modules():
if skip_compute_identifiers and special_cache_identifiers:
if (skip_compute_identifiers and special_cache_identifiers) or (special_cache_identifiers):
if any(re.fullmatch(identifier, name) for identifier in skip_compute_identifiers) or any(
re.fullmatch(identifier, name) for identifier in special_cache_identifiers
):