allow multi-track drifting (multiple images to retcon)

This commit is contained in:
2026-03-30 13:06:31 -04:00
parent 677ea83fa1
commit 0003ac29e9
2 changed files with 8 additions and 7 deletions

View File

@@ -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,