cure-lab / MagicDrive

[ICLR24] Official implementation of the paper “MagicDrive: Street View Generation with Diverse 3D Geometry Control”
https://gaoruiyuan.com/magicdrive/
GNU Affero General Public License v3.0
664 stars 40 forks source link

visualization the attention map #105

Open yancx8 opened 1 week ago

yancx8 commented 1 week ago

Thank you for your work! I want visualization the result of cross attention in BasicTransformerBlock, how can i do? I tried get the attention map, but there is no parameter "need_weights" . Looking forward for your answer!

flymin commented 4 days ago

You may check xformers to acquire the attention map. xformers adopts a block-wise calculation where no explicit "map" is stored in the memory.