forked from AUTOMATIC1111/stable-diffusion-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprompt_gen.py
More file actions
21 lines (17 loc) · 760 Bytes
/
prompt_gen.py
File metadata and controls
21 lines (17 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from constants import orientation_override_words
from word_present import word_present
from constants import negative_prompts, prompt_modifiers
def people_prompt_gen(action, age, sex, clothing):
orientation_specified = word_present(action, orientation_override_words)
if not orientation_specified:
neg_prompt = 'facing the camera, ' + negative_prompts['people']
prompt_mod = prompt_modifiers['people'] + ', facing away'
else:
neg_prompt = negative_prompts['people']
prompt_mod = prompt_modifiers['people']
prompt = age + ' ' + sex + ' wearing ' + clothing + ' ' + action + ', ' + prompt_mod
print('PROMPT:')
print(prompt)
print('NEG_PROMPT: ')
print(neg_prompt)
return prompt, neg_prompt