Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
673d4357
Unverified
Commit
673d4357
authored
Aug 23, 2025
by
Sayak Paul
Committed by
GitHub
Aug 23, 2025
Browse files
add attentionmixin to qwen image (#12219)
parent
561ab54d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/diffusers/models/transformers/transformer_qwenimage.py
src/diffusers/models/transformers/transformer_qwenimage.py
+4
-2
No files found.
src/diffusers/models/transformers/transformer_qwenimage.py
View file @
673d4357
...
...
@@ -25,7 +25,7 @@ from ...configuration_utils import ConfigMixin, register_to_config
from
...loaders
import
FromOriginalModelMixin
,
PeftAdapterMixin
from
...utils
import
USE_PEFT_BACKEND
,
logging
,
scale_lora_layers
,
unscale_lora_layers
from
...utils.torch_utils
import
maybe_allow_in_graph
from
..attention
import
FeedForward
from
..attention
import
AttentionMixin
,
FeedForward
from
..attention_dispatch
import
dispatch_attention_fn
from
..attention_processor
import
Attention
from
..cache_utils
import
CacheMixin
...
...
@@ -470,7 +470,9 @@ class QwenImageTransformerBlock(nn.Module):
return
encoder_hidden_states
,
hidden_states
class
QwenImageTransformer2DModel
(
ModelMixin
,
ConfigMixin
,
PeftAdapterMixin
,
FromOriginalModelMixin
,
CacheMixin
):
class
QwenImageTransformer2DModel
(
ModelMixin
,
ConfigMixin
,
PeftAdapterMixin
,
FromOriginalModelMixin
,
CacheMixin
,
AttentionMixin
):
"""
The Transformer model introduced in Qwen.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment