Skip to content

Commit d15ecd2

Browse files
committed
add attentionmixin to qwen image
1 parent 91a151b commit d15ecd2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/diffusers/models/transformers/transformer_qwenimage.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from ...loaders import FromOriginalModelMixin, PeftAdapterMixin
2525
from ...utils import USE_PEFT_BACKEND, logging, scale_lora_layers, unscale_lora_layers
2626
from ...utils.torch_utils import maybe_allow_in_graph
27-
from ..attention import FeedForward
27+
from ..attention import AttentionMixin, FeedForward
2828
from ..attention_dispatch import dispatch_attention_fn
2929
from ..attention_processor import Attention
3030
from ..cache_utils import CacheMixin
@@ -469,7 +469,9 @@ def forward(
469469
return encoder_hidden_states, hidden_states
470470

471471

472-
class QwenImageTransformer2DModel(ModelMixin, ConfigMixin, PeftAdapterMixin, FromOriginalModelMixin, CacheMixin):
472+
class QwenImageTransformer2DModel(
473+
ModelMixin, ConfigMixin, PeftAdapterMixin, FromOriginalModelMixin, CacheMixin, AttentionMixin
474+
):
473475
"""
474476
The Transformer model introduced in Qwen.
475477

0 commit comments

Comments
 (0)