From 02f646bf8897e6d2ef825e5ec5697cfc071517eb Mon Sep 17 00:00:00 2001 From: Inoland Date: Tue, 24 Mar 2026 20:31:11 +0400 Subject: [PATCH] Update runpod_helper.py --- src/comfyui_ino_nodes/class_helpers/runpod_helper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/comfyui_ino_nodes/class_helpers/runpod_helper.py b/src/comfyui_ino_nodes/class_helpers/runpod_helper.py index 81b6848..f57bf57 100644 --- a/src/comfyui_ino_nodes/class_helpers/runpod_helper.py +++ b/src/comfyui_ino_nodes/class_helpers/runpod_helper.py @@ -80,10 +80,10 @@ class InoVllmRunSyncImage: return (False, -1, "not enabled", "", "", "", ) try: - img_array = (image[0].cpu().numpy() * 255).astype(np.uint8) - pil_img = Image.fromarray(img_array) + i = 255. * image[0].cpu().numpy() + img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8)) buf = io.BytesIO() - pil_img.save(buf, format="JPEG", quality=90) + img.save(buf, format="JPEG", quality=90) image_bytes = buf.getvalue() except Exception as e: return (False, -1, f"image failed: {e}", 0, 0, "", )