图片识别图片压缩优化

This commit is contained in:
DEII 2024-07-25 08:43:40 +08:00
parent ddfa2bb1b0
commit 4e35e591be
1 changed files with 1 additions and 0 deletions

View File

@ -68,6 +68,7 @@ async def GeminiDownloadAllImagesAndSetPrompts(imgurls, rev=False):
async with httpx.AsyncClient(timeout=20) as client: async with httpx.AsyncClient(timeout=20) as client:
res = await client.get(i) res = await client.get(i)
image = Image.open(io.BytesIO(res.content)) image = Image.open(io.BytesIO(res.content))
image = image.convert("RGB")
#进行图片压缩 #进行图片压缩
quality = 85 quality = 85
while True: while True: