Skip to content

Quick and dirty Python script to have Stable Diffusion automatically make a bunch of images pulled from a list of prompts.

Notifications You must be signed in to change notification settings

brianjz/sd-api-random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

stable Diffusion random image generator

I just threw this together since sometimes I just wanted Stable Diffusion to automatically make a bunch of images pulled from a list of prompts.

Setup

At minimum, you just need to set DEFAULT_SAVE_PATH and DEFAULT_MODELS_DIR inside the .py file. You need Stable Diffusion active with either SD.Next or AUTOMATIC1111 with the API running. Other UIs may work, but I mainly work with SD.Next.

Usage

usage: sd-api-random.py [-h] [-f FILE] [-n NUM] [-r REPEAT] [-d DIMENSIONS] [-s STEPS] [-sp SAMPLER] [--saveprompt] [--keepmodel] [--usecurrent] [-noex]

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  Text file with list of prompts, one each line
  -n NUM, --num NUM     Number of images to generate per model
  -r REPEAT, --repeat REPEAT
                        Number of iterations of -num
  -d DIMENSIONS, --dimensions DIMENSIONS
                        Image dimensions WxH, defaults to 512x768
  -s STEPS, --steps STEPS
                        Number of steps, defaults to 30
  -sp SAMPLER, --sampler SAMPLER
                        Sampler, defaults to Euler a
  --saveprompt          Save the prompt to a separate text file in same directory
  --keepmodel           Don't roll back to initial model after completed
  --usecurrent          Use current loaded model, not random one
  -noex, --noextensions
                        Disable sending extension data [adetailer, etc]

About

Quick and dirty Python script to have Stable Diffusion automatically make a bunch of images pulled from a list of prompts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages