Update app.py
Browse files
app.py
CHANGED
|
@@ -126,9 +126,24 @@ def saveImg(imga,filename):
|
|
| 126 |
return True
|
| 127 |
except:
|
| 128 |
return False
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
def image_mod(image):
|
| 131 |
ppStr=random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
output1=proc1("full body girl "+ppStr)
|
| 133 |
saveImg(output1,m_pdir+'save_1_'+ppStr+'.jpg')
|
| 134 |
|
|
@@ -158,7 +173,7 @@ def image_mod(image):
|
|
| 158 |
output11=proc11("full body girl "+ppStr)
|
| 159 |
saveImg(output11,m_pdir+'save_11_'+ppStr+'.jpg')
|
| 160 |
|
| 161 |
-
|
| 162 |
output1 = proc11(
|
| 163 |
"full body sexy girl",
|
| 164 |
negative_prompt = "bad anatomy",
|
|
|
|
| 126 |
return True
|
| 127 |
except:
|
| 128 |
return False
|
| 129 |
+
def imgTry(funcAny,prompt,filename):
|
| 130 |
+
try:
|
| 131 |
+
output=funcAny(prompt)
|
| 132 |
+
saveImg(output,m_pdir+filename)
|
| 133 |
+
return True
|
| 134 |
+
except:
|
| 135 |
+
print("error "+prompt+" ")
|
| 136 |
+
print("e "+filename)
|
| 137 |
+
print("------------")
|
| 138 |
+
return False
|
| 139 |
+
|
| 140 |
def image_mod(image):
|
| 141 |
ppStr=random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)
|
| 142 |
+
imgTry(proc1,"full body girl "+ppStr,'save_1_'+ppStr+'.jpg')
|
| 143 |
+
imgTry(proc2,"full body girl "+ppStr,'save_2_'+ppStr+'.jpg')
|
| 144 |
+
imgTry(proc3,"full body girl "+ppStr,'save_3_'+ppStr+'.jpg')
|
| 145 |
+
|
| 146 |
+
"""
|
| 147 |
output1=proc1("full body girl "+ppStr)
|
| 148 |
saveImg(output1,m_pdir+'save_1_'+ppStr+'.jpg')
|
| 149 |
|
|
|
|
| 173 |
output11=proc11("full body girl "+ppStr)
|
| 174 |
saveImg(output11,m_pdir+'save_11_'+ppStr+'.jpg')
|
| 175 |
|
| 176 |
+
|
| 177 |
output1 = proc11(
|
| 178 |
"full body sexy girl",
|
| 179 |
negative_prompt = "bad anatomy",
|