changed logging for stable diffusion
This commit is contained in:
parent
c24838074f
commit
60c7a4f335
1 changed files with 5 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ import aiohttp
|
|||
import os
|
||||
import time
|
||||
import random
|
||||
import json
|
||||
from PIL import Image, PngImagePlugin
|
||||
|
||||
from discord.ext import commands
|
||||
|
|
@ -294,14 +295,15 @@ async def imagine(ctx):
|
|||
|
||||
with open(my_filename, "rb") as fh:
|
||||
f = discord.File(fh, filename=my_filename)
|
||||
log_data = {'Author': ctx.author.name, 'Prompt': prompt, "Filename":my_filename}
|
||||
|
||||
log_data = f'Author: {ctx.author.name}, Prompt: {prompt}, Filename:{my_filename}\n'
|
||||
with open("databases/stable_diffusion.log", 'a') as log_file:
|
||||
log_file.writelines(list(log_data))
|
||||
log_file.writelines(log_data)
|
||||
|
||||
await ctx.send(f'Generated by: {ctx.author.name}\nPrompt: {prompt}', file=f)
|
||||
await http_session.close()
|
||||
|
||||
|
||||
|
||||
@commands.command(
|
||||
description="Describe",
|
||||
help="Get better understanding of what the bot \"sees\" when you post an image! (Runs it through CLIP) Usage !describe (image link)",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue