Skip to content

Commit 2ed4d37

Browse files
committed
Add deprecation warning for SkyReelsV2AttnProcessor2_0 class
1 parent 77b41fa commit 2ed4d37

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/diffusers/models/transformers/transformer_skyreels_v2.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
from ...configuration_utils import ConfigMixin, register_to_config
2323
from ...loaders import FromOriginalModelMixin, PeftAdapterMixin
24-
from ...utils import USE_PEFT_BACKEND, logging, scale_lora_layers, unscale_lora_layers
24+
from ...utils import USE_PEFT_BACKEND, deprecate, logging, scale_lora_layers, unscale_lora_layers
2525
from ...utils.torch_utils import maybe_allow_in_graph
2626
from ..attention import AttentionMixin, AttentionModuleMixin, FeedForward
2727
from ..attention_dispatch import dispatch_attention_fn
@@ -164,6 +164,16 @@ def apply_rotary_emb(
164164
return hidden_states
165165

166166

167+
class SkyReelsV2AttnProcessor2_0:
168+
def __new__(cls, *args, **kwargs):
169+
deprecation_message = (
170+
"The SkyReelsV2AttnProcessor2_0 class is deprecated and will be removed in a future version. "
171+
"Please use SkyReelsV2AttnProcessor instead. "
172+
)
173+
deprecate("SkyReelsV2AttnProcessor2_0", "1.0.0", deprecation_message, standard_warn=False)
174+
return SkyReelsV2AttnProcessor(*args, **kwargs)
175+
176+
167177
class SkyReelsV2Attention(torch.nn.Module, AttentionModuleMixin):
168178
_default_processor_cls = SkyReelsV2AttnProcessor
169179
_available_processors = [SkyReelsV2AttnProcessor]

0 commit comments

Comments
 (0)