Created
August 7, 2022 16:16
-
-
Save tjthejuggler/1e96acce070f86e2e10ff38426f8e753 to your computer and use it in GitHub Desktop.
GIST created by python code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text_prompts = {} | |
for i in range(330): | |
# text_prompts[i] = ["Beautiful detailed portrait of a man from the year "+str(((i+1)*25)+100)+" by Nick Silva, Shin JeongHo, Wandah Kurniawan, Symmetrical composition with people centered, trending on artstation:4", | |
# "text:-2", "glasses:-50"] | |
j = i//3 | |
if j > 25: | |
text_prompts[i] = [ | |
"Beautiful detailed portrait of a "+str(j-10)+" year old crystal ice queen by Steve McCurry, realistic human eyes, realistic human flesh:330", | |
"text:-250", | |
"glasses:-250" | |
] | |
if j > 10: | |
text_prompts[i] = [ | |
"Beautiful detailed portrait of a "+str(j-10)+" year old crystal ice princess by Steve McCurry, realistic human eyes, realistic human flesh:330", | |
"text:-250", | |
"glasses:-250" | |
] | |
elif j > 5: | |
text_prompts[i] = [ | |
"Beautiful detailed portrait of a "+str(j-5)+" year old crystal ice girl by Steve McCurry, realistic human eyes, realistic human flesh:330", | |
"text:-250", | |
"glasses:-250" | |
] | |
else: | |
text_prompts[i] = [ | |
"Beautiful detailed portrait of an adorable "+str(j)+" day old crystal ice baby by Steve McCurry, realistic human eyes, realistic human flesh:330", | |
"text:-250", | |
"glasses:-250", | |
"color: 275" | |
] | |
image_prompts = { | |
# 0:['ImagePromptsWorkButArentVeryGood.png:2',], | |
} | |
def augment_text_prompts(augmentations): | |
new_text_prompts = text_prompts.copy() | |
aug_dict = {} | |
for key, value in augmentations.items(): | |
aug_dict[key] = get_inbetweens(parse_key_frames(value)) | |
for i in range(max_frames): | |
new_text_prompts[i] = text_prompts.get(max(k for k in text_prompts if k <= int(i))).copy() | |
for key, value in aug_dict.items(): | |
if int(aug_dict[key][i]) != 0: | |
new_text_prompts[i].append(key+":"+str(int(aug_dict[key][i]))) | |
if sum(int(i.split(':')[1]) for i in new_text_prompts[i]) == 0: | |
new_text_prompts[i][0].replace(new_text_prompts[i][0].split(':')[1],str(int(new_text_prompts[i][0].split(':')[1]+1))) | |
return dict(sorted(new_text_prompts.items(), key=lambda x: int(x[0]))) | |
text_prompts = augment_text_prompts({ | |
"Commedia dell'arte devil clown, creepy evil clown makeup, scary dead stare" : "0:(-200), 250:(330)" | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment