Wildcards In Stable Diffusion – Dynamic Prompts for Randomized Results

wildcards-in-stable-diffusion-feature-image

If you click on a link and make a purchase, I may receive a small commission. As an Amazon affiliate partner, I may earn from qualifying purchases.
Read our disclosure.

Stable Diffusion models employ wildcards as variables, serving as placeholders capable of representing various values or ranges. Primarily employed for pattern matching and data manipulation tasks, wildcards contribute to the flexible and dynamic generation of content in the context of image synthesis and manipulation.

The model can fill in details based on its training data by specifying attributes or elements in an image without unnecessary specificity. This approach creates diversity in generated images, with the wildcard leading to varied and random outcomes depending on the model’s interpretation.

Types of Wildcards

Stable Diffusion can have multiple different types of wildcards that aim to randomize the AI generation’s output.

A list of what types of wildcards are available:

  • Character
  • Vehicle
  • Scenery
  • Building
  • Creature
  • Science Fiction
  • Fantasy
  • Magic
  • Clothes
  • Kawaii Girls

Examples of Different Wildcards

  • Billions of Wildcards: A Stable Diffusion wildcard that can randomize characters, creatures, scenery, vehicles, etc.
  • Kawaii Girls: Generates one cute little girl after another
  • Clothes: Roughly 27 different kinds of clothes in the compressed file and about 40 styles in one wildcard. Usually, there are 120 styles in each type of clothing.
  • The 80s: 80s hairs for male and female, full female and male 80s clothing, 80s locations

How to Use Wildcards in Stable Diffusion?

wildcards-installation-location-webui-automatic1111

You need the SD Dynamic Prompt Extension to use wildcards in Stable Diffusion. To get the SD Dynamic Prompt Extension, use the following steps:

  1. Open your ‘Extensions’ menu from the AUTOMATIC1111 web user interface (WebUI).
  2. Click on “Available.”
  3. Select “Load From.”
  4. Scroll down and locate “Dynamic Prompts.”
  5. Click on “Install.” (you can see the installation progress by scrolling back to the top of the browser window)

When the installation is completed, you should restart the AUTOMATIC1111 Webui. After restarting the WebUI, you will see a Dynamic Prompts selection tab.

To use each wildcard successfully read the wildcard creators notes on how to use best the wildcard you downloaded for yourself.

dynamic-prompts-selection-box-automatic1111
From the dynamic prompts selection tab, you can choose to either enable or disable dynamic prompts.

Using variants in dynamic prompting

A distinctive feature of the SD Dynamic Prompt extension is the use of prompt variants. Instead of using static and unchanging prompts, variants introduce an element of randomness and diversity.

Consider a scenario where your prompt includes subjects like a horse, a turtle, a dog, a cat, and a giraffe. By enclosing these subjects in brackets and delineating them with vertical lines, for example, {horse|turtle|dog|cat|giraffe}, the creation of a prompt with randomized variations becomes possible. On each prompt generation, one of the subjects is randomly selected.

By selecting Generate from the WebUI, you will get different subject combinations, such as horse in a city, giraffe at the beach, or a dog on a mountain.

The potential outcomes are limitless, and the injection of randomness imparts a sense of excitement and novelty to your prompts. This same kind of feature is available on Midjourney by using ‘chaos‘ as part of the prompt.

Adding Wildcards to Stable Diffusion

Add your downloaded wildcard(s) to the following folder: ~\stable-diffusion-webui\extensions\sd-dynamic-prompts\wildcards.

Note: If you don’t have the wildcards folder in the sd-dynamic-prompts folder after the extension installation process. You can create the folder by yourself and transfer the downloaded wildcards to it.

You can also manually define where the extension should look for the wildcards in the main WebUI config.json under wildcard_dir.

Feature image credits.

Search
artist-profile-picture-avatar

Okuha

Digital Artist

I’m a digital artist who is passionate about anime and manga art. My true artist journey pretty much started with CTRL+Z. When I experienced that and the limitless color choices and the number of tools I could use with art software, I was sold. Drawing digital anime art is the thing that makes me happy among eating cheeseburgers in between veggie meals.

More Posts

Thank You!

Thank you for visiting the page! If you want to build your next creative product business, I suggest you check out Kittl!