CrossAttentionControl icon indicating copy to clipboard operation
CrossAttentionControl copied to clipboard

negative weighting

Open nicolai256 opened this issue 3 years ago • 1 comments

does negative weighting work properly? most repos that have weighting don't have the option for negative weights, does it work in this one? thanks

nicolai256 avatar Sep 11 '22 12:09 nicolai256

Yes, to my knowledge, only attention weighting, CFG weighting and CLIP guidance weighting works correctly with StableDiffusion. Changing the input embeddings by averaging or doing arithmetic on them is difficult as usually two prompts have different token lengths and usually breaks the generated image.

In this method only attention weighting is implemented, but I plan to add CFG weighting too (however it is slower than this method, needing one more U-Net call for each additional weight!!). CLIP weighting is the slowest so it might not be worth the effort for now.

bloc97 avatar Sep 11 '22 13:09 bloc97