Helpers and lists to generate a variety of prompts for AI image generation
There are many lists. PRs to add more are welcome.
const number = 10
for (let i = 0; i < number; i++) {
prompts.push(`${h.item('scenes')}, ${h.color()}, ${h.item('style')}, ${h.item('genre')}`)
}
> node index.js
serengeti, muted magenta, visionary hypermaximalism, sci-fi
national park, bright ivory, depiction, fantasy
canyon, metallic purple, 2d game art, film noir
tree, very dark periwinkle, digital painting, cyberpunk dystopia
treetops, radiant beige, tempera painting, neoclassical
national park, neon azure, 2d game art, cyber-medieval
rainforest, strong beige, pastel painting, dark fantasy
rainforest, dark ultramarine, digital painting, mid-century
sinkhole, metallic teal, unreal engine render, fantasy noir
valley, radiant yellow, rendered in zbrush, synthwave
Clone this repository and run:
npm install
node index.js
Copy prompts to clipboard:
node index.js | pbcopy
Compose your prompts in index.js
.
There are a number of helpers:
Pick random items from any list. Count defaults to 1.
prompts.push(`${h.item('style')}`)
// oil painting
prompts.push(`${h.item('style', 2)}`)
// artistic photograph, baroque painting
Get an entire list to loop over
In this example a prompt will be made for every type of genre
h.list('genre').forEach((g) => {
prompts.push(`a ${g} painting`)
// a cyberpunk painting
})
Combine h.item
and h.list
:
h.list('genre').forEach((g) => {
prompts.push(`a ${g} painting of a ${h.item('mammal')}`)
// a cyberpunk painting of a tiger
// a steampunk painting of a lion
// ...
})
Get multiple lists to loop over
h.lists(['sea-creatures', 'mammals']).forEach((a) => {
prompts.push(`a painting of a ${a}`)
// a painting of a jellyfish
// ...
})
Shuffle the list of prompts.
h.shuffle(prompts)
Get a random adjective noun pairing.
prompts.push(`a ${h.adjectiveNoun()}`)
// a laden transcript
Get a random year. min
defaults to 1890, max
defaults to 2050
prompts.push(`a photo taken in ${h.year()}`)
// a photo taken in 1952
prompts.push(`a photo taken in ${h.year(2010, 2020)}`)
// a photo taken in 2017
Get a random century. min
defaults to 10, max
defaults to 25
prompts.push(`a painting from ${h.century()}`)
// a painting from 1600
prompts.push(`a painting from ${h.century(17, 20)}`)
// a painting from 1900
Return a random country using fakerjs
prompts.push(`a photo of a street in ${h.country()}`)
// a photo of a street in Canada
Return a random name using fakerjs
prompts.push(`a photo of ${h.name()}`)
// a photo of Allen Brown
Return a random jobTitle using fakerjs
prompts.push(`a photo of a ${h.jobTitle()}`)
// a photo of a global accounts engineer
Return a random jobType using fakerjs
prompts.push(`a photo of a ${h.jobType()}`)
// a photo of a designer
Get a random color with a random modifier. Count defaults to 1.
prompts.push(`a ${h.color()} fish`)
// a bright blue fish
prompts.push(`a ${h.color(2)} fish`)
// a bright blue, radiant crimson fish
Shorthand to get a random animal. Count defaults to 1.
prompts.push(`a painting of a ${h.animal()}`)
// a painting of a tiger
prompts.push(`a painting by ${h.animal(2)}`)
// a painting of a tiger, lion
Shorthand to get a random artist. Count defaults to 1.
Shorthand to get a random ‘trending on X’. Count defaults to 1.
Add to existing files lists/*.txt
or create new ones then run:
node sanitise-lists.js
This will:
- remove duplicates
- lowercase strings (in most cases)
- sort alphabetically