Araeynn commited on
Commit
4bf7e75
1 Parent(s): fed6af9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -22
app.py CHANGED
@@ -205,28 +205,25 @@ async def on_message(message):
205
 
206
  e = await message.reply(embed=embed)
207
  if imgp != "":
208
- try:
209
- 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"""
210
- image = await PT.text_to_image(imgp, negative_prompt=np)
211
- image.save("image.png")
212
- embed.set_footer(
213
- text=
214
- """Refining..."""
215
- )
216
- file = discord.File("image.png", filename="image.png")
217
- embed.set_image(url="attachment://image.png")
218
- await e.edit(embed=embed, attachments=[file])
219
- image = await RF.image_to_image("image.png")
220
- embed.set_footer(
221
- text=
222
- """Information or code generated by Lyre may not always be correct. Lyre was made by Araeyn."""
223
- )
224
- image.save("image.png")
225
- file = discord.File("image.png", filename="image.png")
226
- embed.set_image(url="attachment://image.png")
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)