AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
142.43k stars 26.86k forks source link

[Feature Request]: Truly nullifiable attention (focus/weight) on words #5339

Open TheMundaneDave opened 1 year ago

TheMundaneDave commented 1 year ago

Is there an existing issue for this?

What would your feature do ?

It would be nice if the weight enclosed in brackets was zero the affected words would not apply.

I was playing around with making a sequence of images that progressed from one extreme to another. Something like:

a photo of a (short fat ugly man:1) (tall muscular handsome:0) man working out at the gym

I was going to manually decrease the first value while increasing the other to make a series of images showing a transition between the two states.

While trying this (with the same seed throughout) I noticed while rerolling images that the man wasn't as ugly as I would expect at the beginning or as lean as I would expect at the end, so I took out the 0 value section and found a totally different image was generated which much more accurately portrayed the features of the remaining (100% section) applied the way I was expecting.

I don't have a clue how diffusers work but I had expected that a 0 value applied to a parentheses enclosed section would remove any effect. I would like it to do so.

I will now try playing around with the [from:to:when] of prompt editing but I kinda wanted the latents of each thing to interfere with each other once in the middle.

Proposed workflow

  1. Use of "(something:0)" in a prompt would not affect the generated image at all

Additional information

No response

some9000 commented 1 year ago

Had noticed this as well while doing some prompt testing. Anything above 1 becomes quite tangible, but going the opposite way with values below 1, even up to 0.1 feels like it's happening between 0.9 and 1.0 and not 0 and 1.

TheMundaneDave commented 1 year ago

Had noticed this as well while doing some prompt testing. Anything above 1 becomes quite tangible, but going the opposite way with values below 1, even up to 0.1 feels like it's happening between 0.9 and 1.0 and not 0 and 1.

Wow, I hadn't really noticed how useless values under 1 were. Just did a 0.001 and 1.0 comparison between a (tall statuesque beautiful woman:X), maybe only a few pixels different

hippalectryon-0 commented 1 year ago

Related: Prompt with token weight starting from zero