Skip to content

Commit 153cf0c

Browse files
committed
fix
1 parent 495fddb commit 153cf0c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/diffusers/models/cache_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ def cache_context(self, name: str):
122122
r"""Context manager that provides additional methods for cache management."""
123123
from ..hooks import HookRegistry
124124

125-
if self.is_cache_enabled:
126-
registry = HookRegistry.check_if_exists_or_initialize(self)
127-
registry._set_context(name)
125+
registry = HookRegistry.check_if_exists_or_initialize(self)
126+
registry._set_context(name)
127+
128128
yield
129-
if self.is_cache_enabled:
130-
registry._set_context(None)
129+
130+
registry._set_context(None)

0 commit comments

Comments
 (0)