Skip to content

Usage Examples

junebug12851 edited this page Dec 7, 2022 · 10 revisions

Use Defaults

Uses defaults in settings. If you haven't changed the settings this will print out a random prompt using random amount of words from the English dictionary and random amount of words from the artists file. Some of these words may be emphasized or de-emphasized randomly. It will do nothing more.

node .

Prompt: sooth, snail, gazetteer, Elkhart, convolution, sloop

Specify your own prompt

node . --prompt "landscape, dusk, sunset, sunlight"

Prompt: landscape, dusk, sunset, sunlight

Add some extra randomization to your prompt

This will add a random 10-digit number to your prompt, when re-using your prompt in variations that number will be automatically re-randomized

node . --prompt-salt

Prompt: Exercycle, serpentine, wind's, decennial, snips, detention, anchorwoman, Guido Reni [1325276756]

Fine-tune the auto-prompts

You can get pretty detailed with auto-prompts, make sure to read the details here Quick-Features-Explanation

node . --count 5 --max-count 10 --prompts 3 --emphasis-chance 0.75 --emphasis-max-levels 10 --de-emphasis-chance 0.75 --min-artists 1 --max-artists 10

Prompt: Pepys, chanciness, Guamanian, predicament, Nagpur, shipyard, sanctification, ampersand, [[yipped]], puttee, Honor C. Appleton, Bernat Sanjuan

Prompt: melodramatics, backslapper, teethe, [[[extinguishable]]], [shouter], iOS, groundless, Fuzhou, naive, Antonio Galli Bibiena, Dan Mumford

Prompt: Hamiltonian, [trouble], chimpanzee, gawkily

Change default dictionaries

Anything can be a list, but the program needs to select 2 lists to be designated as the default keywords list and the default artists list. by default, they are keyword which contains English vocabulary and artist which contains the standard Stable diffusion artists. Prompt generation uses these lists by default and so can you with {keyword} and {artist}

But you can change these. A common thing is to use the danbooru lists instead which works well for anime images.

Please note, danbooru can often output NSFW keywords. The default negative prompt will mostly prevent nsfw images no matter the prompt but please be advised when switching to the danbooru lists.

node . --artists "d-artist" --dict "d-keyword"

Prompt: wavy hair, old man, paper, cardigan vest

Auto-generating images and upscaling

The app can send prompts automatically to stable diffusion to have them generated into images and perhaps also upscaled

node . --generate-images --upscale-images

Prompt: eclair, Wobegon, Windsor, hellion, Justin Gerard, Nicolas Mignard

Upscaling...

image

Using Dynamic Prompts

Dynamic prompts are little pieces of code that take-in your prompt and either entirely replace it with a new one, modify it, or add potential functionality to it. They have a specific load order, they take in the prompt from the last dynamic prompt, do something with it, and send it to the next one. The randomizer itself uses many dynamic prompts which offer core functionality (expansions and lists are built-in dynamic prompts)

You can select more dynamic prompts to run, one is already provided for you called landscape which makes a new prompt with landscape keywords and artist if configured to do so. The code below tells landscape to run before all other dynamic prompts and since it generates a prompt from scratch, it means you shouldn't try to provide one.

node . --dyn-prompts "landscape" --generate-images --artists "d-artist" --dict "d-keyword"

Prompt: landscape, Coneflower, Scilla, Lavender, Chestnut tree, afternoon, ragho no erika

1670368465176

Upscaling/Variations on existing images

When you generate an image with this program, it saves it into the output folder. You can go into that folder and copy the filename of an mage and ask it to make upscales or variations. Images save a text file next to each image, this is used for both variations and upscales.

node . --file-variations 1670368465176 --image-subseed-strength 0.25

Loading Settings from File ID: 1670368465176

Prompt: landscape, Coneflower, Scilla, Lavender, Chestnut tree, afternoon, ragho no erika
node . --upscale-file 1670370348430

Upscaling File ID: 1670370348430
Upscaling...
Done!

image

Variation Strength

Use the command --image-subseed-strength <0.0-1.0> to control the variation strength

Images not made by this program

You can also upscale and do variations on images made externally but this is not entirely as straightforward as it seems because it requires a couple of extra steps.

  1. Simply drag and drop the image into the output folder and give it a simple name. However:
  2. You need a text file with the same name next to it.

The text file can actually be completely empty but any information you have on the image can be helpful, especially if you want variations. I recommend to use PNG Info in the WebUI to get information like what prompt was used, what sampler was used, etc... and throw that into the text file.

When you run --upscale-file or --file-variations it will convert that text file into a standard meta file the program uses and proceed to process the request.

Connecting to remote WebUI's

This works well for GPU clouds like Runpod or VastAI, just make sure you start them up with the API flag --api. If the GPU cloud doesn't give you that control, then you may not be able to connect to them. You can also connect to your friends instance should they allow it.

node . --webui-url http://<address>:<port>

You can also use https instead of http but NodeJS will refuse if the https certificate is self-signed which is going to be the majority of WebUI's.

Control over image generation

You do have access to a number of image generation options. Images above 512x512 will automatically have high-res fix enabled.

node . --image-sampler "Euler" --image-steps 64 --image-width 768 --image-height 512 --image-restore-faces --image-denoising 0.7 --image-cfg 12 --image-seed 1285

Prompt: newton, cowcatcher, rile, Birkenstock, chaplet, James Abbott McNeill Whistler, Huang Tingjian

1670384394674