daam  by castorini

Research paper implementation for interpreting Stable Diffusion models

created 2 years ago
771 stars

Top 46.2% on sourcepulse

GitHubView on GitHub
Project Summary

DAAM (Diffusion Attentive Attribution Maps) provides a method for interpreting Stable Diffusion models by visualizing cross-attention mechanisms. It helps users understand which parts of the input prompt influence specific regions of the generated image, targeting researchers and users of diffusion models who need to debug or explain model behavior.

How It Works

DAAM leverages cross-attention maps generated during the diffusion process. By analyzing these maps, it attributes image regions to specific words in the prompt. The approach allows for granular heatmaps per word and global heatmaps, offering a detailed view of the model's internal reasoning. This method is advantageous for its direct link to the attention mechanism, providing a more interpretable explanation than generic saliency methods.

Quick Start & Requirements

Highlighted Details

  • Generates per-word and global heatmaps for Stable Diffusion.
  • Supports CLI utility for quick generation and library integration for custom workflows.
  • Enables serialization and deserialization of generation experiments and heatmaps.
  • Offers an extension, DAAM-i2i, for image-to-image attribution.

Maintenance & Community

The codebase is regularly updated. Questions can be submitted via issues. Links to community resources are not explicitly provided beyond the GitHub repository.

Licensing & Compatibility

The repository does not explicitly state a license in the provided README text. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The README mentions that documentation is still being added. While it supports SDXL and recent Diffusers versions, users should verify compatibility with specific model checkpoints or older library versions.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
19 stars in the last 90 days

Explore Similar Projects

Starred by Dan Abramov Dan Abramov(Core Contributor to React), Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), and
28 more.

stable-diffusion by CompVis

0.1%
71k
Latent text-to-image diffusion model
created 3 years ago
updated 1 year ago
Feedback? Help us improve.