-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite stable diffusion unet with com.microsoft attenion operators (#…
…1454) This PR introduces attention rewriting rules for stable diffusion unet. In summary, scripted function _scaled_dot_product_attention is replaced by either cim.microsoft.Attention, or com.microsoft.MultiHeadAttention.
- Loading branch information
1 parent
19d2498
commit b1d9a81
Showing
37 changed files
with
264 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_0/attn_stable_diffusion_unet_0.onnx
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_0/test_data_set_0/input_0.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_0/test_data_set_0/input_1.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_0/test_data_set_0/input_2.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_0/test_data_set_0/input_3.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_0/test_data_set_0/input_4.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_0/test_data_set_0/input_5.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_0/test_data_set_0/input_6.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_0/test_data_set_0/output_0.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_1/attn_stable_diffusion_unet_1.onnx
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_1/test_data_set_0/input_0.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_1/test_data_set_0/input_1.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_1/test_data_set_0/input_2.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_1/test_data_set_0/input_3.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_1/test_data_set_0/input_4.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_1/test_data_set_0/input_5.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_1/test_data_set_0/input_6.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
testdata/unittest_models/attn_stable_diffusion_unet_1/test_data_set_0/output_0.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...t_encoder_hidden_states_0/attn_stable_diffusion_unet_without_encoder_hidden_states_0.onnx
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...els/attn_stable_diffusion_unet_without_encoder_hidden_states_0/test_data_set_0/input_0.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...els/attn_stable_diffusion_unet_without_encoder_hidden_states_0/test_data_set_0/input_1.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...els/attn_stable_diffusion_unet_without_encoder_hidden_states_0/test_data_set_0/input_2.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...els/attn_stable_diffusion_unet_without_encoder_hidden_states_0/test_data_set_0/input_3.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...els/attn_stable_diffusion_unet_without_encoder_hidden_states_0/test_data_set_0/input_4.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...els/attn_stable_diffusion_unet_without_encoder_hidden_states_0/test_data_set_0/input_5.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ls/attn_stable_diffusion_unet_without_encoder_hidden_states_0/test_data_set_0/output_0.pb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...t_encoder_hidden_states_1/attn_stable_diffusion_unet_without_encoder_hidden_states_1.onnx
Git LFS file not shown
Oops, something went wrong.