A world of possiblities – Dynamic Prompts in Stable Diffusion

In my last post, I shared how I generate character images.  I use that approach when I have a firm idea in mind of what the character looks like or needs to represent.  This post will talk about one of the extensions I use when I’m exploring combinations of characters looking for inspiration.   

Dynamic Prompts

Using Automatic1111 as the UI for my stable difussion install, I’ve added in an extension for enable Dynamic Prompts.  As the instruction page says, it implements an expressive template language for random or combinatorial prompt generation along with features to support deep wildcard directory structures.  Crystal clear, right?

Install the extension via the Automatic1111 Extensions tab.  You can use the Install from URL option and put the GitHub url in the field to handle the installation easily.  You will have to restart your installation to make the extension active.

If you have installed it correctly, you’ll see this on the Generation section of the main page:

Click the arrow on the right side of the control to see the options available.  For now, we’re intersted in the Combinatorial generation logic of the extension, so click it to enable.

We are now ready to create some combinations patterns to see what sort of images we can create for inspiration.

The syntax for a combinarion is to place the options we want inside curly brackets, seperated by a vertical bar:  {option one|option two}.  if we only have one set of curly brackets in our prompt, we will generate two version of the final image the first with option one in the prompt and the seconde with option two.  The power of this approach comes when we have multiple sets of brackets for options:  {option one|option two}, {option A|option B} will generate four images (1A, 2A, 1B, 2B}.  This can result in some intersting images that we can then iterate and elaborate on as we did in the prior post.

Let’s give it a try

Prompt: glamour photograph of a 21 year old woman[Jennifer Lawrence:Audrey Hepburn:{0.3 |0.7}] wearing {miniskirt | thigh-high boots} with {corset top | camisole top}

You can use this approach to get intersting face combinations such as: headshot photograph of  21-year-old model[{Halle Berry | Jennifer Anniston | Cara Delevingne}:{Taylor Swift | Lady Gaga | Tina Turner}:0.5].  

You can use this combination approach across your prompt for scenes as well:  ( pencil and ink \(medium\) artist sketch of {Futuristic|steampunk} city street with {elvish | fairy} merchants selling their wares.

The Dynamic Prompts add in also has the capability to generate semi-random images through use of it’s rich templating and wild-card files.  If there is interest, I can show more about those features as well.

Feel free to follow and subscribe to make your own suggestions and get alerted when new content is posted or old content is updated.  

You can see additional samples of my character images at https://www.charliefoxtrotwriter.com/character-images/

 •  0 comments  •  flag
Share on Twitter
Published on December 15, 2023 10:00
No comments have been added yet.