Sign In

A quick tip guide for dynamic prompts

A quick tip guide for dynamic prompts

Some basic Dynamic Prompts tips

Hey all, just wanted to share a couple of tips I use while i'm testing LORAs. This won't be rocket science to some of you, and to others it'll sound like magic so..... :D
1) Keep your dynamic prompts simple to avoid too many tokens in your prompt

If you find yourself putting more than 4 or 5 elements in a prompt, it's probably time to make a wildcard file. They're just a simple text file with one entry per line so nothing complicated, and once you put them in your wilcards directory the wildcard manager lets you copypasta the trigger for the wildcard file so it's simple as.

2) Randomising wilcards use

You can randomise whether a wildcard files gets used by nesting it in a dynamic prompt.

{_|__mywildcardfile__}

for example will give you a 50/50 chance of using a wilcard otherwise it'll just put an underscore which will be ignored if you have dynamic prompts set to ignore underscores and extra spaces.

If you want more you can put in as many |_| as you like as nulls e.g.

{_|_|_|__wildcards__} 

would give you a 25% chance of using a wildcard

3) You can do the same thing inside a wildcard file

If you want to have a chance a wildcard file will do nothing, say you want a chance something will have it's default clothing instead of using your clothing wildcards. Note you dont need to actually put undersscores in the wildcard.txt file, blank lines will do, I personally like to put them in as indicators.

red hair
blond hair
green hair
-
-
-

Will give you a 50% chance of nothing and each hair color will be roughly 17%

You can of course also do the opposite and double things up:

red hair
red hair
red hair
blond hair
_
_

Which will give you a ~50chance of red hair, ~17% or blond or ~34% or no change giving you a high chance of red hair, which is as things should be :D

4) Wildcards can be nested, and you can call other wildcards from within a wildcard file

To keep your prompts shorter you can even nest wildcards inside wildcard files. So for example the following is perfectly legitimate inside a wildcard.txt:

{_|_|__mywildcard__}
{__mywildcard__|__yourwildcard__|__anotherwildcard__}
blond hair
green hair
_
_

Which will really mix things up, especially if THOSE wildcard files have more nested wildcard files :D

5) did you know you can apply simple weights IN wildcard files as well ?

(red hair:1.2)
(blond hair:1.0)
(green hair:2)

Note these weights apply as they normally would in a prompt, they're not related to the chance of that prompt being chosen.

That's all i've got for this one, hopefully it's useful to some folk to get an idea of how to control what dynamic prompts and wildcards do.

p.s. if you don't have dynamic prompts installed, you probably should :d it's in the a1111 extensions list so it's very easy to get running (though it DOES have some conflicts with other extensions that use different versions or some of its requirements)

And if you want some simple wildcard files you can grab mine here or the ones specific to my cthulhuTECH lora here many of which are generic and don't require the lora.

19

Comments