From 4bd6cedc904b9d48fab6895afe365e97a83a2e32 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 1 Jun 2026 15:06:15 +0000 Subject: [PATCH 1/3] WAI-4807 --- .../remove_video_background_node.py | 19 +++++++++++++++++-- pyproject.toml | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/nodes/video_nodes/remove_video_background_node.py b/nodes/video_nodes/remove_video_background_node.py index 48c2dca..30097bf 100644 --- a/nodes/video_nodes/remove_video_background_node.py +++ b/nodes/video_nodes/remove_video_background_node.py @@ -14,6 +14,7 @@ class RemoveVideoBackgroundNode(): video_url (str): Local path or URL of the video to process. preserve_audio (bool, optional): Whether to keep the audio track. Default is True. output_container_and_codec (str, optional): Desired output format and codec. Default is "webm_vp9". + background_color Predefined string only - one of the predefined enum values Returns: result_video_url (STRING): URL of the video with background removed. @@ -41,6 +42,19 @@ class RemoveVideoBackgroundNode(): "mkv_vp9", "gif" ], {"default": "webm_vp9"}), + "background_color": ([ + "Transparent", + "Black", + "White", + "Gray", + "Red", + "Green", + "Blue", + "Yellow", + "Cyan", + "Magenta", + "Orange" + ], {"default": "Transparent"}) } } @@ -52,7 +66,7 @@ class RemoveVideoBackgroundNode(): def __init__(self): self.api_url = "https://engine.prod.bria-api.com/v2/video/edit/remove_background" - def execute(self, api_key, video_url, preserve_audio=True, output_container_and_codec="webm_vp9",): + def execute(self, api_key, video_url, preserve_audio=True, output_container_and_codec="webm_vp9",background_color="Transparent"): if api_key.strip() == "" or api_key.strip() == "BRIA_API_TOKEN": raise Exception("Please insert a valid API key.") video_path = None @@ -73,7 +87,8 @@ class RemoveVideoBackgroundNode(): payload = { "video": input_video_url, "preserve_audio": preserve_audio, - "output_container_and_codec": output_container_and_codec + "output_container_and_codec": output_container_and_codec, + "background_color":background_color } headers = bria_json_headers(api_key) diff --git a/pyproject.toml b/pyproject.toml index b0b7068..1d14073 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-bria-api" description = "Custom nodes for ComfyUI using BRIA's API." -version = "2.1.18" +version = "2.1.19" license = {file = "LICENSE"} [project.urls] From 62dc71a50c929da4e494949b2e0f7682fc35f0b9 Mon Sep 17 00:00:00 2001 From: Yazan Numoor <96680445+yazan-bria@users.noreply.github.com> Date: Tue, 2 Jun 2026 11:47:47 +0300 Subject: [PATCH 2/3] Change default color from Transparent to Black --- nodes/video_nodes/remove_video_background_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/video_nodes/remove_video_background_node.py b/nodes/video_nodes/remove_video_background_node.py index 30097bf..5e2242c 100644 --- a/nodes/video_nodes/remove_video_background_node.py +++ b/nodes/video_nodes/remove_video_background_node.py @@ -54,7 +54,7 @@ class RemoveVideoBackgroundNode(): "Cyan", "Magenta", "Orange" - ], {"default": "Transparent"}) + ], {"default": "Black"}) } } From 4974b034942bf9f3b962dc572c71e1a740c061ac Mon Sep 17 00:00:00 2001 From: Yazan Numoor <96680445+yazan-bria@users.noreply.github.com> Date: Tue, 2 Jun 2026 11:48:31 +0300 Subject: [PATCH 3/3] Update default background color in execute method Changed default background color from 'Transparent' to 'Black' in execute method. --- nodes/video_nodes/remove_video_background_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/video_nodes/remove_video_background_node.py b/nodes/video_nodes/remove_video_background_node.py index 5e2242c..3c21c59 100644 --- a/nodes/video_nodes/remove_video_background_node.py +++ b/nodes/video_nodes/remove_video_background_node.py @@ -66,7 +66,7 @@ class RemoveVideoBackgroundNode(): def __init__(self): self.api_url = "https://engine.prod.bria-api.com/v2/video/edit/remove_background" - def execute(self, api_key, video_url, preserve_audio=True, output_container_and_codec="webm_vp9",background_color="Transparent"): + def execute(self, api_key, video_url, preserve_audio=True, output_container_and_codec="webm_vp9",background_color="Black"): if api_key.strip() == "" or api_key.strip() == "BRIA_API_TOKEN": raise Exception("Please insert a valid API key.") video_path = None