Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
7e60999
1
Parent(s):
24b4440
Update app.py
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ def auto_prompt_correction(prompt_ui,neg_prompt_ui,disable_auto_prompt_correctio
|
|
72 |
prompt=prompt.lower()
|
73 |
neg_prompt=neg_prompt.lower()
|
74 |
if(disable_auto_prompt_correction):
|
75 |
-
prompt=f"
|
76 |
return prompt, neg_prompt
|
77 |
|
78 |
if(prompt=="" and neg_prompt==""):
|
@@ -85,19 +85,22 @@ def auto_prompt_correction(prompt_ui,neg_prompt_ui,disable_auto_prompt_correctio
|
|
85 |
if( word in splited_prompt):
|
86 |
prompt=f"anime, masterpiece, {prompt}, good pupil, 4k, detailed"
|
87 |
neg_prompt=f"(((deformed))), blurry, ((((bad anatomy)))), {neg_prompt}, bad pupil, disfigured, poorly drawn face, mutation, mutated, (extra limb), (ugly), (poorly drawn hands), bad hands, fused fingers, messy drawing, broken legs censor, low quality, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), ((bad eyes)), ui, error, missing fingers, fused fingers, one hand with more than 5 fingers, one hand with less than 5 fingers, one hand with more than 5 digit, one hand with less than 5 digit, extra digit, fewer digits, fused digit, missing digit, bad digit, liquid digit, long body, uncoordinated body, unnatural body, lowres, jpeg artifacts, 3d, cg, text"
|
88 |
-
|
|
|
89 |
animal_words=["cat","dog","bird"]
|
90 |
for word in animal_words:
|
91 |
if( word in splited_prompt):
|
92 |
prompt=f"anime, a {word}, 4k, detailed"
|
93 |
neg_prompt=f"(((deformed))), blurry, ((((bad anatomy)))), {neg_prompt}, bad pupil, disfigured, poorly drawn face, mutation, mutated, (extra limb), (ugly), (poorly drawn hands), bad hands, fused fingers, messy drawing, broken legs censor, low quality, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), ((bad eyes)), ui, error, missing fingers, fused fingers, one hand with more than 5 fingers, one hand with less than 5 fingers, one hand with more than 5 digit, one hand with less than 5 digit, extra digit, fewer digits, fused digit, missing digit, bad digit, liquid digit, long body, uncoordinated body, unnatural body, lowres, jpeg artifacts, 3d, cg, text"
|
94 |
-
|
|
|
95 |
background_words=["mount fuji","mt. fuji","building", "buildings", "tokyo", "kyoto", "nara", "shibuya", "shinjuku"]
|
96 |
for word in background_words:
|
97 |
if( word in splited_prompt):
|
98 |
-
prompt=f"
|
99 |
neg_prompt=f"(((deformed))), {neg_prompt}, girl, boy, photo, people, low quality, ui, error, lowres, jpeg artifacts, 2d, 3d, cg, text"
|
100 |
-
|
|
|
101 |
return prompt,neg_prompt
|
102 |
|
103 |
def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
|
|
|
72 |
prompt=prompt.lower()
|
73 |
neg_prompt=neg_prompt.lower()
|
74 |
if(disable_auto_prompt_correction):
|
75 |
+
prompt=f"anime, {prompt}"
|
76 |
return prompt, neg_prompt
|
77 |
|
78 |
if(prompt=="" and neg_prompt==""):
|
|
|
85 |
if( word in splited_prompt):
|
86 |
prompt=f"anime, masterpiece, {prompt}, good pupil, 4k, detailed"
|
87 |
neg_prompt=f"(((deformed))), blurry, ((((bad anatomy)))), {neg_prompt}, bad pupil, disfigured, poorly drawn face, mutation, mutated, (extra limb), (ugly), (poorly drawn hands), bad hands, fused fingers, messy drawing, broken legs censor, low quality, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), ((bad eyes)), ui, error, missing fingers, fused fingers, one hand with more than 5 fingers, one hand with less than 5 fingers, one hand with more than 5 digit, one hand with less than 5 digit, extra digit, fewer digits, fused digit, missing digit, bad digit, liquid digit, long body, uncoordinated body, unnatural body, lowres, jpeg artifacts, 3d, cg, text"
|
88 |
+
return prompt, neg_prompt
|
89 |
+
|
90 |
animal_words=["cat","dog","bird"]
|
91 |
for word in animal_words:
|
92 |
if( word in splited_prompt):
|
93 |
prompt=f"anime, a {word}, 4k, detailed"
|
94 |
neg_prompt=f"(((deformed))), blurry, ((((bad anatomy)))), {neg_prompt}, bad pupil, disfigured, poorly drawn face, mutation, mutated, (extra limb), (ugly), (poorly drawn hands), bad hands, fused fingers, messy drawing, broken legs censor, low quality, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), ((bad eyes)), ui, error, missing fingers, fused fingers, one hand with more than 5 fingers, one hand with less than 5 fingers, one hand with more than 5 digit, one hand with less than 5 digit, extra digit, fewer digits, fused digit, missing digit, bad digit, liquid digit, long body, uncoordinated body, unnatural body, lowres, jpeg artifacts, 3d, cg, text"
|
95 |
+
return prompt, neg_prompt
|
96 |
+
|
97 |
background_words=["mount fuji","mt. fuji","building", "buildings", "tokyo", "kyoto", "nara", "shibuya", "shinjuku"]
|
98 |
for word in background_words:
|
99 |
if( word in splited_prompt):
|
100 |
+
prompt=f"anime, shinkai makoto, {word}, 4k, 8k, highly detailed"
|
101 |
neg_prompt=f"(((deformed))), {neg_prompt}, girl, boy, photo, people, low quality, ui, error, lowres, jpeg artifacts, 2d, 3d, cg, text"
|
102 |
+
return prompt, neg_prompt
|
103 |
+
|
104 |
return prompt,neg_prompt
|
105 |
|
106 |
def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
|