allow multi-track drifting (multiple images to retcon)
This commit is contained in:
@@ -278,14 +278,17 @@ async def doodlebob(ctx, *, message: str):
|
||||
|
||||
@bot.command(name="retcon")
|
||||
async def retcon(ctx, *, message: str):
|
||||
image_url = ctx.message.attachments[0].url
|
||||
image_data = requests.get(image_url).content
|
||||
image_bytestream = BytesIO(image_data)
|
||||
image_data_list = []
|
||||
for discord_image in ctx.message.attachments:
|
||||
image_url = discord_image.url
|
||||
image_data = requests.get(image_url).content
|
||||
image_bytestream = BytesIO(image_data)
|
||||
image_data_list.append(image_bytestream)
|
||||
|
||||
await ctx.send(f"**Rewriting history to match {message[:100]}...**")
|
||||
|
||||
image_b64 = llama_wrapper.image_edit(
|
||||
image=image_bytestream,
|
||||
image=image_data_list,
|
||||
prompt=message,
|
||||
openai_url=IMAGE_EDIT_ENDPOINT,
|
||||
openai_api_key=IMAGE_EDIT_ENDPOINT_KEY,
|
||||
|
||||
Reference in New Issue
Block a user