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 fa9a1f3 commit 7ad7cc8Copy full SHA for 7ad7cc8
src/diffusers/models/modeling_utils.py
@@ -33,7 +33,6 @@
33
from torch import Tensor, nn
34
35
from .. import __version__
36
-from ..hooks import apply_layerwise_casting
37
from ..quantizers import DiffusersAutoQuantizer, DiffusersQuantizer
38
from ..quantizers.quantization_config import QuantizationMethod
39
from ..utils import (
@@ -402,6 +401,7 @@ def enable_layerwise_casting(
402
401
non_blocking (`bool`, *optional*, defaults to `False`):
403
If `True`, the weight casting operations are non-blocking.
404
"""
+ from ..hooks import apply_layerwise_casting
405
406
user_provided_patterns = True
407
if skip_modules_pattern is None:
0 commit comments