From 808721a995f1e275c84e89d53ff3c85294cb6dd9 Mon Sep 17 00:00:00 2001 From: ori-liberman Date: Sun, 22 Dec 2024 14:21:15 +0000 Subject: [PATCH] Change optimize_description and enhance_ref_image types from BOOLEAN to INT --- bria_api_node.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bria_api_node.py b/bria_api_node.py index db1a089..4c2c2e6 100644 --- a/bria_api_node.py +++ b/bria_api_node.py @@ -127,7 +127,7 @@ class ShotByTextNode(BriaAPINode): "required": { "image": ("IMAGE",), # Input image from another node "scene_description": ("STRING",), - "optimize_description": ("BOOLEAN", {"default": "True"}), + "optimize_description": ("INT", {"default": 1}), "api_key": ("STRING", {"default": "BRIA_API_TOKEN"}) # API Key input with a default value } } @@ -149,6 +149,7 @@ class ShotByTextNode(BriaAPINode): if isinstance(image, torch.Tensor): image = self.preprocess_image(image) + optimize_description = bool(optimize_description) image_base64 = self.image_to_base64(image) payload = { "file": image_base64, @@ -187,7 +188,7 @@ class ShotByImageNode(BriaAPINode): "required": { "image": ("IMAGE",), # Input image from another node "ref_image": ("IMAGE",), # ref image from another node - "enhance_ref_image": ("BOOLEAN", {"default": "True"}), + "enhance_ref_image": ("INT", {"default": 1}), "api_key": ("STRING", {"default": "BRIA_API_TOKEN"}) # API Key input with a default value } } @@ -214,6 +215,7 @@ class ShotByImageNode(BriaAPINode): # Convert the image and mask directly to Base64 strings image_base64 = self.image_to_base64(image) ref_image_base64 = self.image_to_base64(ref_image) + enhance_ref_image = bool(enhance_ref_image) payload = { "file": image_base64,