Created
August 3, 2022 17:04
-
-
Save tjthejuggler/8754f3d498ff1fbdc9ee2b4bbcd5b30f to your computer and use it in GitHub Desktop.
GIST created by python code
This file contains 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 by Lee Jeffries, trending on artstation, octane render, unreal engine, realistic human eyes:330", | |
"text:-250", | |
"glasses:-250" | |
] | |
if j > 10: | |
text_prompts[i] = [ | |
"Beautiful detailed portrait of a "+str(j-10)+" year old by Lee Jeffries, trending on artstation, octane render, unreal engine, realistic human eyes:330", | |
"text:-250", | |
"glasses:-250" | |
] | |
elif j > 5: | |
text_prompts[i] = [ | |
"Beautiful detailed portrait of a "+str(j-5)+" year old by Lee Jeffries, trending on artstation, octane render, unreal engine, realistic human eyes:330", | |
"text:-250", | |
"glasses:-250" | |
] | |
else: | |
text_prompts[i] = [ | |
"Beautiful detailed portrait of an adorable "+str(j)+" day old baby by, trending on artstation, octane render, unreal engine, 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