diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

question about attention block

Open xiaohu2015 opened this issue 3 years ago • 1 comments

why we use torch.baddbmm to do query @ key? https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention.py#L640

xiaohu2015 avatar Dec 14 '22 13:12 xiaohu2015

In our experiments this was the fastest way of doing the query @ key computation :-) See: https://github.com/huggingface/diffusers/pull/371 https://github.com/huggingface/diffusers/pull/511

patrickvonplaten avatar Dec 19 '22 12:12 patrickvonplaten