castorini / daam

Diffusion attentive attribution maps for interpreting Stable Diffusion.
MIT License
669 stars 61 forks source link

cross attention map of an existing image #57

Closed kingnobro closed 8 months ago

kingnobro commented 8 months ago

Hi. I want to ask, how to compute the cross attention map of an existing image? For example, I already have an image of a human, my text is "a man is jumping". I want to get the heat map of word "jump".

In your code, it seems that the heat map is collected from the generation process.

Thanks.