From aadf07b9c37dc69c1905b62b9fc2b28f22fa8c19 Mon Sep 17 00:00:00 2001 From: Alex Nunet Date: Wed, 4 Sep 2024 15:13:17 -0400 Subject: [PATCH] fix stupid image conversion mistake (don't look it's embarrassing) --- nodes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodes.py b/nodes.py index 27f7221..5a60210 100644 --- a/nodes.py +++ b/nodes.py @@ -43,7 +43,7 @@ class FalLLaVAAPI: #Convert from image tensor to array image_np = 255. * image.cpu().numpy().squeeze() image_np = np.clip(image_np, 0, 255).astype(np.uint8) - img = Image.fromarray(image_np).convert('L') + img = Image.fromarray(image_np) #upload image buffered = io.BytesIO() img.save(buffered, format="PNG") @@ -301,7 +301,7 @@ class FalFluxLoraAPI: #Convert from image tensor to array image_np = 255. * image.cpu().numpy().squeeze() image_np = np.clip(image_np, 0, 255).astype(np.uint8) - img = Image.fromarray(image_np).convert('L') + img = Image.fromarray(image_np) #downscale image to prevent excess cost width, height = img.size #get size for checking max_dimension = max(width, height) @@ -365,7 +365,7 @@ class FalFluxI2IAPI: #Convert from image tensor to array image_np = 255. * image.cpu().numpy().squeeze() image_np = np.clip(image_np, 0, 255).astype(np.uint8) - img = Image.fromarray(image_np).convert('L') + img = Image.fromarray(image_np) #downscale image to prevent excess cost width, height = img.size #get size for checking max_dimension = max(width, height)