#Generate Image Prompts with Random Ideas Every Day

1 messages · Page 1 of 1 (latest)

lavish iris
#

Using command line utilities I retrieve random artists, styles, cameras, and techniques, then pass that to the llm command line utility to generate random prompts.

You will need llm, shuf, iconv, tr, and sed available on the cmdline.

pip install llm
llm keys set openai
llm 'Artists work can be described through prompts. [REMOVED FOR BREVITY] For this task you will take inspiration from the following $input. Write 20 prompts given the instructions above, do not title or number your prompts.' --save artprompts

You will have to replace the urls with your own as I can't post them here but they are just gist text files with list of the thing in question.

curl -s YOURARTISTGISTHERE | shuf -n 3 | iconv -f utf-8 -t ascii//translit | tr '\n' ',' | sed 's/,$/\n/' > .temp_artist_%Date:~10,4%%Date:~4,2%%Date:~7,2%.txt && curl -s YOURCAMERAGISTHERE | shuf -n 2 | iconv -f utf-8 -t ascii//translit | tr '\n' ',' | sed 's/,$/\n/' > .temp_camera_%Date:~10,4%%Date:~4,2%%Date:~7,2%.txt && curl -s YOURSTYLEGISTHERE | shuf -n 2 | iconv -f utf-8 -t ascii//translit | tr '\n' ',' | sed 's/,$/\n/' > .temp_styles_%Date:~10,4%%Date:~4,2%%Date:~7,2%.txt && curl -s YOURTECHNIQUEGISTHERE | shuf -n 1 | iconv -f utf-8 -t ascii//translit | tr '\n' ',' | sed 's/,$/\n/' > .temp_techniques_%Date:~10,4%%Date:~4,2%%Date:~7,2%.txt && @for /F "delims=" %a in ('type .temp_artist_%Date:~10,4%%Date:~4,2%%Date.txt ^| more +0') do @for /F "delims=" %b in ('type .temp_styles_%Date:~10,4%%Date:~4,2%%Date.txt ^| more +0') do @for /F "delims=" %c in ('type .temp_techniques_%Date:~10,4%%Date:~4,2%%Date.txt ^| more +0') do @for /F "delims=" %d in ('type .temp_camera_%Date:~10,4%%Date:~4,2%%Date.txt ^| more +0') do @echo Using the following artists for inspiration: %a, create prompts using the style: %b making use of %c technique and shot on a camera like %d > .temp_inspiration_%Date:~10,4%%Date:~4,2%%Date:~7,2%.txt && cat .temp_inspiration_%Date:~10,4%%Date:~4,2%%Date:~7,2%.txt | llm -t artprompts

lavish iris
#

Basically for each of the 4 files.. artists, styles, cameras, and techniques, it retrieves it using curl.. and shuffles and picks 1,2 or 3 lines depending on the file and saves it to a dated temporary file. It then combines those 4 files into a "inspiration" temporary file.. and sends the contents of that file as an argument to the llm command line utility, which replaces "$input" in the template with the contents of that file.. executes the prompt on GPT-3.5 and returns the result to console.

#

If you want to have it create files just pipe the last command ... `llm -t artprompts > my_new_prompt_file.txt"

#

I can break down the commands into individual commands if that helps anyone, was just trying to stay under the char limit.

#

These are the temp files.. that are generated.. I usually just have my actual prompts go out to dated prom_date.txt files with minutes, seconds and hours.. but up to you 🙂