Skip to content

Commit b3b11b5

Browse files
committed
up
1 parent 511c7a4 commit b3b11b5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/diffusers/pipelines/pipeline_utils.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
)
6868
from ..utils.hub_utils import _check_legacy_sharding_variant_format, load_or_create_model_card, populate_model_card
6969
from ..utils.torch_utils import empty_device_cache, get_device, is_compiled_module
70-
from .stable_diffusion.pipeline_stable_diffusion_utils import StableDiffusionMixin as ActualStableDiffusionMixin
7170

7271

7372
if is_torch_npu_available():
@@ -2171,8 +2170,14 @@ def _maybe_raise_error_if_group_offload_active(
21712170
return False
21722171

21732172

2174-
class StableDiffusionMixin(ActualStableDiffusionMixin):
2173+
class StableDiffusionMixin:
21752174
def __init__(self, *args, **kwargs):
21762175
deprecation_message = "`StableDiffusionMixin` from `diffusers.pipelines.pipeline_utils` is deprecated and this will be removed in a future version. Please use `StableDiffusionMixin` from `diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_utils`, instead."
21772176
deprecate("StableDiffusionMixin", "1.0.0", deprecation_message)
2178-
super().__init__(*args, **kwargs)
2177+
2178+
# To avoid circular imports and for being backwards-compatible.
2179+
from .stable_diffusion.pipeline_stable_diffusion_utils import (
2180+
StableDiffusionMixin as ActualStableDiffusionMixin,
2181+
)
2182+
2183+
ActualStableDiffusionMixin.__init__(self, *args, **kwargs)

0 commit comments

Comments
 (0)