Skip to content

Commit cb06c47

Browse files
committed
update
1 parent dbae971 commit cb06c47

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/diffusers/hooks/enhance_a_video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __torch_function__(self, func, types, args=(), kwargs=None):
7676
query = kwargs.get("query", None) or args[0]
7777
key = kwargs.get("key", None) or args[1]
7878
self.query_key_save_callback(query, key)
79-
return func(*args, **(kwargs or {}))
79+
return func(*args, **kwargs)
8080

8181

8282
class EnhanceAVideoSDPAHook(ModelHook):

src/diffusers/models/modeling_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
from typing_extensions import Self
3535

3636
from .. import __version__
37-
from ..hooks import apply_group_offloading, apply_layerwise_casting
3837
from ..quantizers import DiffusersAutoQuantizer, DiffusersQuantizer
3938
from ..quantizers.quantization_config import QuantizationMethod
4039
from ..utils import (
@@ -414,6 +413,7 @@ def enable_layerwise_casting(
414413
non_blocking (`bool`, *optional*, defaults to `False`):
415414
If `True`, the weight casting operations are non-blocking.
416415
"""
416+
from ..hooks import apply_layerwise_casting
417417

418418
user_provided_patterns = True
419419
if skip_modules_pattern is None:
@@ -479,6 +479,8 @@ def enable_group_offload(
479479
... )
480480
```
481481
"""
482+
from ..hooks import apply_group_offloading
483+
482484
if getattr(self, "enable_tiling", None) is not None and getattr(self, "use_tiling", False) and use_stream:
483485
msg = (
484486
"Applying group offloading on autoencoders, with CUDA streams, may not work as expected if the first "

0 commit comments

Comments
 (0)