stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Feature Request]: Add "Diffusion attentive attribution maps" to help understand how prompts affects image generation

Open Yardanico opened this issue 3 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

https://github.com/castorini/daam would allow users to understand how different parts of prompt affect the generated image. Would require a custom implementation since of the interface the method in the repo doesn't seem to scale well to long prompts at all.

Example of what it can do:

image

Proposed workflow

Probably implemented as a custom extension that can hook up to txt2img (and img2img too) and add some kind of selector/dropdown to choose what parts of the prompt you want to see a heatmap for.

Additional information

No response

Yardanico avatar Nov 11 '22 07:11 Yardanico

That looks really useful when trying to understand impact of promt keywords. If someone could make it work within the UI that would be amazing.

some9000 avatar Nov 11 '22 09:11 some9000

Seconded!

eadnams22 avatar Nov 17 '22 20:11 eadnams22

I believe this can be a very useful extension.

Kameronski avatar Nov 24 '22 06:11 Kameronski

Related: https://github.com/benkyoujouzu/stable-diffusion-webui-visualize-cross-attention-extension

ghost avatar Dec 01 '22 07:12 ghost

Related: https://github.com/benkyoujouzu/stable-diffusion-webui-visualize-cross-attention-extension

This sounds good but i'd prefer the daam style heatmap instead of this one

pomee4 avatar Dec 01 '22 12:12 pomee4

https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/5298

ghost avatar Dec 02 '22 10:12 ghost

https://github.com/kousw/stable-diffusion-webui-daam

mezotaken avatar Jan 13 '23 16:01 mezotaken