daam  by castorini

Research paper implementation for interpreting Stable Diffusion models

Created 2 years ago
773 stars

Top 45.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

Inactive

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

Explore Similar Projects

Feedback? Help us improve.