Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -205,28 +205,25 @@ async def on_message(message):
|
|
205 |
|
206 |
e = await message.reply(embed=embed)
|
207 |
if imgp != "":
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
await e.edit(embed=embed, attachments=[file])
|
228 |
-
except:
|
229 |
-
print(image)
|
230 |
|
231 |
except Exception as e:
|
232 |
print(e)
|
|
|
205 |
|
206 |
e = await message.reply(embed=embed)
|
207 |
if imgp != "":
|
208 |
+
np = """lowres, text, error, cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, username, watermark, signature"""
|
209 |
+
image = await PT.text_to_image(imgp, negative_prompt=np)
|
210 |
+
image.save("image.png")
|
211 |
+
embed.set_footer(
|
212 |
+
text=
|
213 |
+
"""Refining..."""
|
214 |
+
)
|
215 |
+
file = discord.File("image.png", filename="image.png")
|
216 |
+
embed.set_image(url="attachment://image.png")
|
217 |
+
await e.edit(embed=embed, attachments=[file])
|
218 |
+
image = await RF.image_to_image("image.png")
|
219 |
+
embed.set_footer(
|
220 |
+
text=
|
221 |
+
"""Information or code generated by Lyre may not always be correct. Lyre was made by Araeyn."""
|
222 |
+
)
|
223 |
+
image.save("image.png")
|
224 |
+
file = discord.File("image.png", filename="image.png")
|
225 |
+
embed.set_image(url="attachment://image.png")
|
226 |
+
await e.edit(embed=embed, attachments=[file])
|
|
|
|
|
|
|
227 |
|
228 |
except Exception as e:
|
229 |
print(e)
|