- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 514
 
Wildcards
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, 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
In addition to standard wildcards, SD.Next also supports curly braces syntax for inline choices:
woman with {blonde|brunette|red-head|purple highlights} hair
You can also mix and match both wildcards and curly braces in the same prompt:
woman with {blonde|__color__} hair
- 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.txtin wildcards folder and any subfoldrer
If wildcard is refered as__nsp/color__then it will look forcolor.txtonly innspfolder 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