yownas / shift-attention

In stable diffusion, generate a sequence of images shifting attention in the prompt.
Other
164 stars 17 forks source link

Weight changing of prompt part without () in a prompt with AND #1

Closed Nialpo closed 1 year ago

Nialpo commented 1 year ago

With your script, if I make a prompt like "photo of (cat:1~ 0) or (dog:0~ 1) AND green background:0~1" (ignore spaces) The script don't change last weight. Supposed to be: "photo of (cat:1) or (dog:0) AND green background:0" "photo of (cat:0.9) or (dog:0.1) AND green background:0.1" ...etc

And "photo of (cat:1~ 0) or (dog:0~ 1) AND (green background:0~1)" gives greatly different output... But it is a thing of SD itself

yownas commented 1 year ago

Yes. That is not an error. The script only change things in the pattern ":~<number)".

I haven't used AND before, but would adding a number at the end work? In that case I can see if I can make the script work without ")".

yownas commented 1 year ago

Fixed it. :)

Nialpo commented 1 year ago

I haven't used AND before, but would adding a number at the end work?

Yes, and before AND too. Examples here: (3.) https://www.youtube.com/watch?v=Ch3jsq6O2cI Thanks