-
Notifications
You must be signed in to change notification settings - Fork 3
/
prompt_parser.py
19 lines (16 loc) · 1.08 KB
/
prompt_parser.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
def parse_ez_negative(prompt):
# This function parses too and from the ez negative format if it is used
if "easy_negative" in prompt:
# Parse from ez negative
prompt = prompt.replace(
"easy_negative", "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name")
else:
# Parse to ez negative
prompt = prompt.replace(
"lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name", "easy_negative")
return prompt
def ez_negative_long(prompt):
if "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name" in prompt:
return True
else:
return False