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

Allow explicit padding in prompt

Open hentailord85ez opened this issue 1 year ago • 4 comments

Allows for explicitly padding to the next token set of 75 using 'OR' keyword. I don't know if thats the best keyword; what are your thoughts?

Closes #2305

hentailord85ez avatar Oct 14 '22 18:10 hentailord85ez

Except for one thing at the end the code seems fine, but it's not known whether this really is needed. I don't want to add features users don't need because they would just complicate already big codebase. Also guard can be made a lot bugger to make sure user doesn't actually use it somewhere

AUTOMATIC1111 avatar Oct 16 '22 08:10 AUTOMATIC1111

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2305#issuecomment-1277066221

Also, there is an error saying composition via AND is not supported for DDIM/PLMS samplers, but using these samples with "OR" is possible (because the magic happens before a sampler is invoked, right?)

I think this sole reason is enough to ship in production for good!

Also my examples in that issue.

UPD: By the way, do we need to update Wiki as well?

aleksusklim avatar Oct 16 '22 16:10 aleksusklim

I've increased the guard by 2. The justification for the feature is that you could have multiple lines of prompts for specific details, so 1 for setting, 1 for character, without slowing down generation by any significant amount. It is explained and tested in more detail by @aleksusklim above.

hentailord85ez avatar Oct 16 '22 18:10 hentailord85ez

Any progress on this?

Recently I used DDIM to inpaint various characters into one big picture, but I've struggled to describe one of them properly for the model to understand (it was the frozen frog inside an ice cube, if you curious). I got an idea to try luck with "AND" but… DDIM doesn't support it.

I had to change sampler which made this inpaining worse and more visible, since the texture of background have changed. I believe that "OR" could help me to describe things, keeping DDIM as the sampler.

Also I propose a different name for it: "PLUS" https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2305#issuecomment-1306105366

aleksusklim avatar Nov 07 '22 19:11 aleksusklim