-
-
Notifications
You must be signed in to change notification settings - Fork 439
Wildcards
Vladimir Mandic edited this page Dec 6, 2024
·
1 revision
Wildcards are placeholders in the prompt text that are replaced with a random value from a list of choices which allows for more variety in the prompts generated.
- SD.Next supports standard file-based wildcards in prompts.
- Wildcard support is enabled by default, enabled by default, can be disabled in settings -> extra networks if you want to use 3rd party extension instead of SD.Next built-in support.
- Wildcards folder is set in settings -> system paths, default is
models\wildcards
TL;DR: string "__abc__"
in prompt is matched to a file abc.txt
inside wildcards folder
The prompt syntax for wildcards is:
a woman wearing a
__color__
dress
In the wildcards folder, create file color.txt
and add multiple choices with one choice per line:
red
green
blue
- Wildcards can be used in both positive and negative prompts
- Prompt can have any number of wildcards
a woman wearing a
__color__
dress and a__shape__
hat - Wildcards can be nested
Line inside wildcard file can also have a wildcard referrring to another wildcard, etc. - Supports filename-only and path-based wildcards with full subfolder support
If wildcard is refered as__color__
then it will look for filecolor.txt
in wildcards folder and any subfoldrer
If wildcard is refered as__nsp/color__
then it will look forcolor.txt
only innsp
folder inside wildcards folder - Wildcards files can be in one-choice per line or multiple choices per line separated by
|
format
Wildcard matches and replacements will be logged in the standard log with debug level:
DEBUG Wildcards apply: wildcard="color" choice="Yellow" file="models/wildcards/my-variations/color.txt" choices=930