Araeynn commited on
Commit
3d91f55
1 Parent(s): 91abb6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -6,6 +6,7 @@ import random
6
  import datetime
7
  from threading import Thread
8
  import discord
 
9
  import discord.utils
10
  from discord.ext import tasks
11
  from PIL import Image
@@ -401,6 +402,7 @@ async def on_message(message):
401
  e = await message.reply(embed=embed)
402
  if imgp != "":
403
  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"""
 
404
  image = await SDXL.text_to_image(imgp, negative_prompt=np)
405
  image.save("image.png")
406
  embed.set_footer(
@@ -411,9 +413,10 @@ async def on_message(message):
411
  embed.set_image(url="attachment://image.png")
412
  await e.edit(embed=embed, attachments=[file])
413
  image = await RF.image_to_image("image.png", num_inference_steps=20)
 
414
  embed.set_footer(
415
  text=
416
- """Information or code generated by Lyre may not always be correct."""
417
  )
418
  image.save("image.png")
419
  file = discord.File("image.png", filename="image.png")
 
6
  import datetime
7
  from threading import Thread
8
  import discord
9
+ import time
10
  import discord.utils
11
  from discord.ext import tasks
12
  from PIL import Image
 
402
  e = await message.reply(embed=embed)
403
  if imgp != "":
404
  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"""
405
+ st = time.time()
406
  image = await SDXL.text_to_image(imgp, negative_prompt=np)
407
  image.save("image.png")
408
  embed.set_footer(
 
413
  embed.set_image(url="attachment://image.png")
414
  await e.edit(embed=embed, attachments=[file])
415
  image = await RF.image_to_image("image.png", num_inference_steps=20)
416
+ et = time.time()
417
  embed.set_footer(
418
  text=
419
+ f"Took {et - st} seconds to generate."
420
  )
421
  image.save("image.png")
422
  file = discord.File("image.png", filename="image.png")