floyo logobeta logo
Powered by
ThinkDiffusion
floyo logobeta logo
Powered by
ThinkDiffusion

ComfyUI-DAAM

22

Last updated
2025-06-08

ComfyUI DAAM is an extension that introduces custom nodes for visualizing Diffusion Attentive Attribution Maps (DAAM) within Stable Diffusion models. It effectively displays cross-attention heatmaps, allowing users to analyze how specific words in a prompt relate to different areas of an image, which is beneficial for debugging and training purposes.

  • Provides detailed heatmap visualizations for both positive and negative prompts.
  • Includes an interactive preview feature that reveals which words are most influential in specific image regions.
  • Fully compatible with various Stable Diffusion models, including SDXL and SD1.5.

Context

This tool enhances ComfyUI by integrating custom nodes that facilitate the visualization of attention maps derived from prompts used in Stable Diffusion. The primary objective is to help users understand the relationship between their textual prompts and the generated images, making it easier to analyze model behavior and improve training processes.

Key Features & Benefits

The DAAM extension offers several practical features that enhance the user experience. Key functionalities include the ability to visualize heatmaps that indicate how different parts of an image correspond to specific words in a prompt. This is particularly useful for identifying which elements of the prompt are driving the model's output, thus enabling more informed adjustments to prompts and better overall results.

Advanced Functionalities

Among the advanced capabilities of the DAAM extension is the DAAM Preview node, which allows for interactive exploration of attention maps. Users can hover over different regions of an image to see which words are most associated with those areas, ranked by attention scores. This feature provides a deeper understanding of how the model interprets prompts, facilitating targeted refinements.

Practical Benefits

By incorporating this tool into their workflows, ComfyUI users gain enhanced control over the image generation process. The ability to visualize attention maps improves the quality of outputs and increases efficiency by providing immediate feedback on how changes in prompts affect results. This leads to a more streamlined and effective creative process.

Credits/Acknowledgments

This project is a derivative of the original work by @kousw from the SD Web UI implementation. Special thanks to the contributors and the community for supporting the development of these custom nodes. The extension is available under an open-source license, fostering collaboration and innovation in the AI art space.