We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 495fddb commit 153cf0cCopy full SHA for 153cf0c
src/diffusers/models/cache_utils.py
@@ -122,9 +122,9 @@ def cache_context(self, name: str):
122
r"""Context manager that provides additional methods for cache management."""
123
from ..hooks import HookRegistry
124
125
- if self.is_cache_enabled:
126
- registry = HookRegistry.check_if_exists_or_initialize(self)
127
- registry._set_context(name)
+ registry = HookRegistry.check_if_exists_or_initialize(self)
+ registry._set_context(name)
+
128
yield
129
130
- registry._set_context(None)
+ registry._set_context(None)
0 commit comments