mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-24 13:20:19 +08:00
Resize thumbnails to preview size before sending
This commit is contained in:
parent
2ec980bb9f
commit
2655327ae2
@ -229,6 +229,8 @@ class PromptServer():
|
|||||||
if preview_info[-1].isdigit():
|
if preview_info[-1].isdigit():
|
||||||
quality = int(preview_info[-1])
|
quality = int(preview_info[-1])
|
||||||
|
|
||||||
|
img.thumbnail((256, 256), Image.ANTIALIAS)
|
||||||
|
|
||||||
buffer = BytesIO()
|
buffer = BytesIO()
|
||||||
if image_format in ['jpeg']:
|
if image_format in ['jpeg']:
|
||||||
img = img.convert("RGB")
|
img = img.convert("RGB")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user