Skip to content
Open
12 changes: 11 additions & 1 deletion scripts/webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,15 @@ def classToArrays( items, seed, n_iter ):

return all_seeds, n_iter, prompt_matrix_parts, all_prompts, needrows


def replace_wildcard(chunk):
if not " " in chunk:
file_dir = os.path.dirname(os.path.realpath("__file__"))
replacement_file = os.path.join(file_dir, "scripts/wildcards/" + chunk + ".txt")
if os.path.exists(replacement_file):
lines = open(replacement_file, encoding="utf8").read().splitlines()
my_line = random.choice(lines)
return(my_line)
return(chunk)

def process_images(
outpath, func_init, func_sample, prompt, seed, sampler_name, skip_grid, skip_save, batch_size,
Expand Down Expand Up @@ -841,6 +849,8 @@ def process_images(

all_prompts = batch_size * n_iter * [prompt]
all_seeds = [seed + x for x in range(len(all_prompts))]

all_prompts = list(map(lambda one_prompt: "".join(map(replace_wildcard, one_prompt.split("__"))), all_prompts))
original_seeds = all_seeds.copy()

precision_scope = autocast if opt.precision == "autocast" else nullcontext
Expand Down
181 changes: 181 additions & 0 deletions scripts/wildcards/adjective.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
beautiful
fascinating
interesting
dire
terrifying
elusive
frantic
serene
evil
festive
mind-bending
complex
simple
extraordinary
masterpiece
tangible
psychotic
warlike
unusual
astonishing
grumpy
efficacious
nutty
aspiring
functional
ignorant
fallacious
noxious
rich
lyrical
level
grouchy
vengeful
skillful
gruesome
neat
striped
glib
uptight
tremendous
overwrought
dazzling
holistic
lush
abandoned
adorable
abhorrent
resonant
feigned
macho
delicate
thundering
sophisticated
jealous
stimulating
nonchalant
icy
blue
cool
draconian
squealing
puny
hesitant
kindhearted
elite
capricious
meek
nasty
superficial
flowery
elastic
old
witty
pretty
maniacal
glamorous
honorable
delightful
conscious
harsh
average
unadvised
good
serious
untidy
abrasive
deafening
tough
boorish
shaky
elegant
secret
sweltering
parched
smart
epic
dramatic
colossal
gigantic
tiny
ridiculous
cromulent
weird
surreal
boring
funny
cute
natural
unnatural
swirling
twisted
angular
expressive
impressive
oppressive
repressive
colorful
vibrant
modular
steampunk
dieselpunk
clockwork
cyberpunk
cold
cloudy
foggy
sharp
ruined
ancient
futuristic
disgusting
delicious
fruit-flavored
unappetizing
rounded
zany
slimy
dusty
rusty
deteriorating
sturdy
rickety
dreamlike
painterly
wispy
metallic
stone
shiny
matte
pastel
rainbow
atmospheric
moody
spiritual
ghostly
ghastly
biomechanical
petrified
illuminated
glowing
fiery
metallic
retrofuturistic
giant
hyperdetailed
shadowy
supersized
incredibly detailed
otherworldly
cozy
gentle
sprawling
dystopian
apocalyptic
primordial
underwater
psychadelic
groovy
minimalist
cluttered
dilapidated
Loading