hi, good day..
“Generate a prompt generator. the generator is using simple efficient pseudocode syntax-like format that should builds image prompts in this logic: pose + 'pose' | camera shot: mood1,mood2, subject 'wearing a' attire; whimsical activity | camera shot: place mood1, setting, place mood2 + related place 'in the background' | two photo styles, film stock brand names, two technical keywords.”
"Allow user input to input how many prompts to generate, if else just one."
“Allow user input for each parameter or random selection if no input provided by the user.”
“Create 6 generator variations in different structure system, but based from the provided logic.”
“Show two example prompt outputs from each generator version.”
"The generator should be easy readable for a text-based AI to generate the output."
Thank you.
Assistant
Hi! Below is a comprehensive solution for your request.
I have created 6 variations of a prompt generator, each following the core logic and format you provided but structured differently for variety. Each version accepts user inputs or defaults to random selections if inputs are empty. They can generate one or multiple prompts based on user input.
The pseudocode syntax is simple and text-friendly, easy for another AI to read and implement.
FUNCTION RandomChoice(list)
RETURN list[random integer between 0 and length(list)-1]
END
How to get input or random fallback:
pseudocode
FUNCTION GetInputOrRandom(prompt_message, options_list)
INPUT user_input WITH prompt_message + " (leave empty for random)"
IF user_input IS NOT empty THEN
RETURN user_input
ELSE
RETURN RandomChoice(options_list)
END
END
6 Generator Variations with example prompt outputs
Version 1: Classic Linear Pipeline Format
pseudocode
FUNCTION GeneratePrompt1()
pose = GetInputOrRandom("Enter pose", POSES)
mood1 = GetInputOrRandom("Enter first mood", MOODS)
mood2 = GetInputOrRandom("Enter second mood", MOODS)
subject = GetInputOrRandom("Enter subject", SUBJECTS)
attire = GetInputOrRandom("Enter attire", ATTIRE)
activity = GetInputOrRandom("Enter whimsical activity", ACTIVITIES)
shot1 = GetInputOrRandom("Enter first camera shot", CAMERA_SHOTS)
place1 = GetInputOrRandom("Enter first place", PLACES)
place2 = GetInputOrRandom("Enter second place", PLACES)
shot2 = GetInputOrRandom("Enter second camera shot", CAMERA_SHOTS)
photoStyle1 = GetInputOrRandom("Enter first photo style", PHOTO_STYLES)
photoStyle2 = GetInputOrRandom("Enter second photo style", PHOTO_STYLES)
film1 = GetInputOrRandom("Enter first film stock", FILM_STOCKS)
film2 = GetInputOrRandom("Enter second film stock", FILM_STOCKS)
tech1 = GetInputOrRandom("Enter first technical keyword", TECHNICALS)
tech2 = GetInputOrRandom("Enter second technical keyword", TECHNICALS)
PROMPT = pose + " pose | " + shot1 + ": " + mood1 + "," + mood2 + ", " + subject + " wearing a " + attire + "; " + activity + " | " + shot2 + ": " + place1 + " " + mood1 + ", setting, " + place2 + " " + mood2 + " in the background | " + photoStyle1 + ", " + photoStyle2 + ", " + film1 + ", " + film2 + ", " + tech1 + ", " + tech2 + "."
RETURN PROMPT
END
# Generate user requested count:
INPUT count WITH "How many prompts to generate? (if empty or <= 0, generate 1)"
IF count IS empty OR count <= 0 THEN
count = 1
END
FOR i FROM 1 TO count
PRINT GeneratePrompt1()
END
Example outputs:
code
standing pose | close-up: happy, calm, woman wearing a red dress; painting a mural | medium shot: beach happy, setting, forest calm in the background | black and white, sepia, Kodak Portra 400, Ilford HP5 Plus, shallow depth of field, bokeh.
walking pose | wide shot: excited, mysterious, cat wearing a leather jacket; dancing in the rain | portrait: city street excited, setting, mountain mysterious in the background | vivid colors, soft focus, Fujifilm Velvia 50, Kodak Tri-X 400, long exposure, lens flare.
leaning pose | portrait: calm, happy, man wearing a formal suit; reading a book | close-up: beach calm, setting, city street happy in the background | vivid colors, soft focus, Kodak Portra 400, Agfa Vista 200, lens flare, high dynamic range.
sitting pose | medium shot: excited, melancholic, woman wearing a red dress; dancing in the rain | wide shot: forest excited, setting, mountain melancholic in the background | sepia, black and white, Ilford HP5 Plus, Kodak Tri-X 400, shallow depth of field, bokeh.
FUNCTION GeneratePrompt6()
FUNCTION ParamInputOrDefault(param_name, pool)
INPUT val WITH "Input for " + param_name + " or leave empty"
IF val IS empty THEN
# choose value with a bias - e.g. pick first but 50% chance random
IF random number between 0 and 1 > 0.5 THEN
RETURN pool[0]
ELSE
RETURN RandomChoice(pool)
END
ELSE
RETURN val
END
END
pose = ParamInputOrDefault("pose", POSES)
shot1 = ParamInputOrDefault("camera shot 1", CAMERA_SHOTS)
mood1 = ParamInputOrDefault("mood 1", MOODS)
mood2 = ParamInputOrDefault("mood 2", MOODS)
subject = ParamInputOrDefault("subject", SUBJECTS)
attire = ParamInputOrDefault("attire", ATTIRE)
activity = ParamInputOrDefault("whimsical activity", ACTIVITIES)
shot2 = ParamInputOrDefault("camera shot 2", CAMERA_SHOTS)
place1 = ParamInputOrDefault("place 1", PLACES)
place2 = ParamInputOrDefault("place 2", PLACES)
photoStyle1 = ParamInputOrDefault("photo style 1", PHOTO_STYLES)
photoStyle2 = ParamInputOrDefault("photo style 2", PHOTO_STYLES)
film1 = ParamInputOrDefault("film stock 1", FILM_STOCKS)
film2 = ParamInputOrDefault("film stock 2", FILM_STOCKS)
tech1 = ParamInputOrDefault("technical keyword 1", TECHNICALS)
tech2 = ParamInputOrDefault("technical keyword 2", TECHNICALS)
PROMPT = pose + " pose | " + shot1 + ": " + mood1 + "," + mood2 + ", " + subject + " wearing a " + attire + "; " + activity + " | " + shot2 + ": " + place1 + " " + mood1 + ", setting, " + place2 + " " + mood2 + " in the background | " + photoStyle1 + ", " + photoStyle2 + ", " + film1 + ", " + film2 + ", " + tech1 + ", " + tech2 + "."
RETURN PROMPT
END
How to use for multiple prompts:
pseudocode
INPUT promptCount WITH "Number of prompts to generate?"
IF promptCount IS empty OR promptCount <= 0 THEN
promptCount = 1
END
FOR i FROM 1 TO promptCount
PRINT GeneratePromptX() # X = version number you want to test
END
Summary Notes:
Each version follows your logic: pose + "pose" | camera shot: mood1,mood2, subject wearing attire; activity | camera shot: place moods + setting + place moods in background | 2 photo styles, 2 film stocks, 2 technical keywords
User inputs are prompted, empty input triggers random pick.
The prompt format is text-friendly and easy to parse.
If you want, I can also provide a fully coded solution in a specific programming language like Python, or extend this with better input validation! Just ask.
User
thanks. can you make 3 simpler and smaller yet highly efficient effective variations?
Assistant
Certainly! Here are 3 simpler, smaller yet efficient prompt generator variations, keeping the core logic intact but expressed in more minimal pseudocode style for easy use and speed. Each accepts user input or random fallback and can generate multiple prompts.
Input validation is the process of verifying that user input meets certain criteria before using it. This ensures the input is acceptable, safe, and makes sense for the program or system. It helps avoid errors, crashes, or unexpected results.
Why add input validation to the prompt generator?
To ensure the user enters something meaningful or choose from a list of valid options.
To prevent empty, invalid, or mistyped inputs that might break the generator logic.
To provide friendly feedback if input is wrong and ask again.
To help keep generated prompts consistent and correct.
Examples for your prompt generator
Assuming user input is a string, here are some example validations you might add:
Check if input is empty → if empty, choose a random default.
Check if input is from allowed list → e.g., if moods allowed are ["happy", "calm", "excited"], reject anything else.
Check input length → e.g., make sure attire description isn't too long or too short.
Check input format → e.g., no numbers/symbols if it's a word.
Simple pseudocode example of input validation for one parameter
pseudocode
FUNCTION inputValidated(promptText, validOptions)
LOOP
val = INPUT(promptText + " (leave empty for random): ")
IF val IS empty THEN
RETURN randomChoice(validOptions)
ELSE IF val IN validOptions THEN
RETURN val
ELSE
PRINT "Invalid input. Please enter one of: " + Join(validOptions, ", ")
END
END LOOP
END
Use this to replace simpler inputOrRandom functions. This way, you only accept valid inputs, or random defaults if user skips.
Benefits for your generators:
User can't accidentally mistype and cause garbage or errors
More consistent prompt outputs
Foster more predictable and higher quality image prompt generation
If you want, I can provide an updated generator version including validation!
User
hmm, too complex, to proggraming, i think. but please provide those with example outputs.. thanks
Assistant
Understood! Here's a simpler version of input validation pseudocode that’s easy to implement, plus two example outputs. The validation just re-prompts user until the input is either empty (then picks random) or exactly matches one of the allowed options.
Simple input validation function (very easy to implement)
pseudocode
FUNCTION inputValidated(promptText, allowedList)
WHILE TRUE
val = INPUT(promptText + " (empty=random)")
IF val IS empty THEN
RETURN randomChoice(allowedList)
ELSE IF val IN allowedList THEN
RETURN val
ELSE
PRINT "Invalid input! Allowed options: " + Join(allowedList, ", ")
END
END WHILE
END
Example generator using the above validation (simplified Variation 1)
make those even simpler yet efficient. make 2 more variation with simpler pseudocode-like system (the user is not a programmer)
Assistant
Absolutely! Here are 2 even simpler variations with very easy-to-understand pseudocode, tailored for non-programmers. They still do input validation in a gentle way and produce your prompts efficiently.
Variation A: Simple Repeat-Until-Valid (No complex loops)
pseudocode
FUNCTION getInputValid(message, options)
PRINT message + " (choose from: " + Join(options, ", ") + " or leave empty = random)"
val = INPUT()
IF val IS empty THEN
RETURN randomChoice(options)
ELSE IF val IS IN options THEN
RETURN val
ELSE
PRINT "Sorry, that is not valid."
# Ask again by calling the function recursively (or repeat manually)
RETURN getInputValid(message, options)
END IF
END
FUNCTION generatePromptA()
pose = getInputValid("Pose?", POSES)
shot1 = getInputValid("Camera shot 1?", SHOTS)
mood1 = getInputValid("Mood 1?", MOODS)
mood2 = getInputValid("Mood 2?", MOODS)
subject = getInputValid("Subject?", SUBJECTS)
attire = getInputValid("Attire?", ATTIRE)
activity = getInputValid("Activity?", ACTIVITIES)
shot2 = getInputValid("Camera shot 2?", SHOTS)
place1 = getInputValid("Place 1?", PLACES)
place2 = getInputValid("Place 2?", PLACES)
style1 = getInputValid("Photo style 1?", STYLES)
style2 = getInputValid("Photo style 2?", STYLES)
film1 = getInputValid("Film stock 1?", FILMS)
film2 = getInputValid("Film stock 2?", FILMS)
tech1 = getInputValid("Technical keyword 1?", TECHS)
tech2 = getInputValid("Technical keyword 2?", TECHS)
PRINT pose + " pose | " + shot1 + ": " + mood1 + "," + mood2 + ", " + subject + " wearing " + attire + "; " + activity + " | " + shot2 + ": " + place1 + " " + mood1 + ", setting, " + place2 + " " + mood2 + " in background | " + style1 + ", " + style2 + ", " + film1 + ", " + film2 + ", " + tech1 + ", " + tech2 + "."
END
User
thank you.
Assistant
You're very welcome! 😊
Glad I could help simplify things for you. If you ever need more assistance or a ready-to-run script, just ask. Have fun generating those creative prompts! 🎨📸✨
DATA params = [
("pose", POSES),
("shot1", SHOTS),
("mood1", MOODS),
("mood2", MOODS),
("subject", SUBJECTS),
("attire", ATTIRE),
("activity", ACTIVITIES),
("shot2", SHOTS),
("place1", PLACES),
("place2", PLACES),
("style1", STYLES),
("style2", STYLES),
("film1", FILMS),
("film2", FILMS),
("tech1", TECHS),
("tech2", TECHS)
]
FUNCTION genPrompt2()
values = []
FOR item IN params
val = INPUT(item[0]+"? (empty=random)")
IF val IS empty THEN val = randomChoice(item[1])
APPEND val TO values
END
RETURN values[0]+" pose | "+values[1]+": "+values[2]+","+values[3]+", "+values[4]+" wearing "+values[5]+"; "+values[6]+" | "+values[7]+": "+values[8]+" "+values[2]+", setting, "+values[9]+" "+values[3]+" in background | "+values[10]+", "+values[11]+", "+values[12]+", "+values[13]+", "+values[14]+", "+values[15]+"."
END
Variation 3: Short Function + Template
pseudocode
FUNCTION inputOrRand(p, list)
i = INPUT(p+" (empty=random)")
RETURN i IF i IS NOT empty ELSE randomChoice(list)
END
FUNCTION genPrompt3()
p = inputOrRand("pose", POSES)
s1 = inputOrRand("shot1", SHOTS)
m1 = inputOrRand("mood1", MOODS)
m2 = inputOrRand("mood2", MOODS)
sub = inputOrRand("subject", SUBJECTS)
att = inputOrRand("attire", ATTIRE)
act = inputOrRand("activity", ACTIVITIES)
s2 = inputOrRand("shot2", SHOTS)
pl1 = inputOrRand("place1", PLACES)
pl2 = inputOrRand("place2", PLACES)
sty1 = inputOrRand("style1", STYLES)
sty2 = inputOrRand("style2", STYLES)
f1 = inputOrRand("film1", FILMS)
f2 = inputOrRand("film2", FILMS)
t1 = inputOrRand("tech1", TECHS)
t2 = inputOrRand("tech2", TECHS)
template = "{p} pose | {s1}: {m1},{m2}, {sub} wearing {att}; {act} | {s2}: {pl1} {m1}, setting, {pl2} {m2} in background | {sty1}, {sty2}, {f1}, {f2}, {t1}, {t2}."
RETURN template.format(p=p,s1=s1,m1=m1,m2=m2,sub=sub,att=att,act=act,s2=s2,pl1=pl1,pl2=pl2,sty1=sty1,sty2=sty2,f1=f1,f2=f2,t1=t1,t2=t2)
END
Usage for multiple prompts (applies to all 3):
pseudocode
n = INPUT("How many prompts? (empty=1)")
IF n IS empty OR n <= 0 THEN n=1 END
FOR i = 1 TO n
PRINT genPromptX() # Replace X with 1, 2, or 3 for each variation
END
These 3 are minimal in size but maintain ease of reading, efficient parameter handling, and clear prompt output in your desired format.
Let me know if you want me to adapt any of these to a specific language or add input validations!
Example outputs (assuming user hits enter for random or chooses valid inputs)
code
Output 1:
standing pose | close-up: happy,mysterious, woman wearing leather jacket; painting a mural | medium shot: beach happy, setting, city street mysterious in background | black and white, vivid colors, Kodak Portra 400, Fujifilm Velvia 50, shallow depth of field, bokeh.
Output 2:
walking pose | wide shot: calm, excited, dog wearing casual hoodie; dancing in the rain | portrait: forest calm, setting, mountain excited in background | sepia, soft focus, Ilford HP5 Plus, Kodak Tri-X 400, long exposure, lens flare.
Summary
User types exact words like "standing" or "happy".
If input is empty, it picks a random choice.
If input is invalid, it keeps asking until valid or empty.
Output is formatted as requested for image prompts.
Would you like me to help make this even simpler or provide a ready-to-run Python snippet?
Variation B: One-by-One Ask, Random fallback without repeat (shows warning)
How to generate multiple prompts (both variations)
pseudocode
PRINT "How many prompts do you want?"
num = INPUT()
IF num IS empty OR num <= 0 THEN
num = 1
END
FOR i = 1 TO num
generatePromptA() # or generatePromptB(), depending on which variation you run
PRINT "" # Blank line between prompts
END
Example outputs (random or user chosen)
code
Example 1 (user inputs valid values):
Pose? (choose from: standing, sitting, jumping...)
> standing
Camera shot 1?
> close-up
Mood 1?
> happy
Mood 2?
> calm
Subject?
> woman
... (and so on)
Output:
standing pose | close-up: happy,calm, woman wearing leather jacket; painting a mural | medium shot: beach happy, setting, forest calm in background | sepia, soft focus, Kodak Portra 400, Ilford HP5 Plus, bokeh, lens flare.
Example 2 (user inputs invalid value and then empty):
Pose?
> fly
Sorry, that is not valid.
Pose?
>
(randomly picks one, e.g. sitting)
Output:
sitting pose | overhead shot: melancholic,excited, dog wearing casual hoodie; dancing in the rain | portrait: city street melancholic, setting, mountain excited in background | black and white, vivid colors, Fujifilm Velvia 50, Kodak Tri-X 400, shallow depth of field, long exposure.
These variations are designed so the user just sees prompts, and if they make a typo they are either gently asked again (variation A) or warned and defaulted (variation B) — no complicated logic, easy to read and run.
Let me know if you want me to give you this in a ready-made text script or simple app!