castorini/daam
A cross-attention visualization technique for interpreting Stable Diffusion image generation.

DAAM (Diffusion Attentive Attribution Maps) generates attention-based heatmaps that reveal how Stable Diffusion models respond to different parts of a text prompt when generating images. The tool hooks into the cross-attention layers of diffusion models to produce attribution maps that highlight which word tokens most influence different regions of the generated output. It supports the standard Stable Diffusion models as well as SDXL, and provides both a Python library for integration and a CLI/demo interface.