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

[Feature Request]: Some sort of an OR operator that randomly picks a keyword?

Open some9000 opened this issue 3 years ago • 4 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 ?

As far as I can tell this has not been mentioned and is not available. Would it be possible to have something like an OR modifier where if you do [cat OR dog] it will just randomly pick one for each prompt? Perhaps make several available as well, like [cat OR dog OR fox]. That would be quite neat when making a bunch of images. It seems like currently available methods only allow to make arrays of all these possible combinations or such. A simple random selection would be neat. Sounds like it could be doable if complex functions like the [A|B] and [A:B:0,5] are possible.

Proposed workflow

Separate keywords with OR to have either randomly selected on each run. Like [cat OR dog].

Additional information

No response

some9000 avatar Oct 20 '22 10:10 some9000

There are several custom scripts for that. https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts

winterspringsummer avatar Oct 20 '22 11:10 winterspringsummer

I see. Still, it would be nice if that was built in. So it can work with other scripts. Thanks for the example.

some9000 avatar Oct 20 '22 16:10 some9000

Also alternating words is a thing, which has a similar effect.

guaneec avatar Oct 21 '22 04:10 guaneec

Also alternating words is a thing, which has a similar effect.

I'm aware of that, but that's a totally different effect. That merges things. I'm talking about randomly picking one option when rendering.

some9000 avatar Oct 21 '22 06:10 some9000

https://github.com/ThereforeGames/unprompted This comes in a form of an extension and can work with other scripts. Includes random pick as an example

mezotaken avatar Jan 06 '23 09:01 mezotaken