Commit bcbbded
[Bug] Fix QwenImageEditPlus Series on NPU (#13017)
* [Bug Fix][Qwen-Image-Edit] Fix Qwen-Image-Edit series on NPU
* Enhance NPU attention handling by converting attention mask to boolean and refining mask checks.
* Refine attention mask handling in NPU attention function to improve validation and conversion logic.
* Clean Code
* Refine attention mask processing in NPU attention functions to enhance performance and validation.
* Remove item() ops on npu fa backend.
* Reuse NPU attention mask by `_maybe_modify_attn_mask_npu`
* Apply style fixes
* Update src/diffusers/models/attention_dispatch.py
---------
Co-authored-by: zhangtao <zhangtao529@huawei.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>1 parent 35086ac commit bcbbded
File tree
2 files changed
+32
-4
lines changed- src/diffusers/models
- transformers
2 files changed
+32
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1117 | 1117 | | |
1118 | 1118 | | |
1119 | 1119 | | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1120 | 1140 | | |
1121 | 1141 | | |
1122 | 1142 | | |
| |||
1134 | 1154 | | |
1135 | 1155 | | |
1136 | 1156 | | |
| 1157 | + | |
| 1158 | + | |
1137 | 1159 | | |
1138 | 1160 | | |
1139 | 1161 | | |
1140 | 1162 | | |
1141 | 1163 | | |
| 1164 | + | |
1142 | 1165 | | |
1143 | 1166 | | |
1144 | 1167 | | |
| |||
2668 | 2691 | | |
2669 | 2692 | | |
2670 | 2693 | | |
2671 | | - | |
2672 | | - | |
2673 | 2694 | | |
2674 | 2695 | | |
2675 | 2696 | | |
| 2697 | + | |
| 2698 | + | |
2676 | 2699 | | |
2677 | 2700 | | |
2678 | 2701 | | |
2679 | 2702 | | |
2680 | 2703 | | |
| 2704 | + | |
2681 | 2705 | | |
2682 | 2706 | | |
2683 | 2707 | | |
| |||
2692 | 2716 | | |
2693 | 2717 | | |
2694 | 2718 | | |
2695 | | - | |
| 2719 | + | |
2696 | 2720 | | |
2697 | 2721 | | |
2698 | 2722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
0 commit comments