Compare commits

..
9 Commits
Author SHA1 Message Date
Yazan Numoor 822e3b2fac Merge pull request #46 from Bria-AI/WAI-4807
WAI-4807
2026-06-02 11:48:50 +03:00
Yazan Numoor 4974b03494 Update default background color in execute method
Changed default background color from 'Transparent' to 'Black' in execute method.
2026-06-02 11:48:31 +03:00
Yazan Numoor 62dc71a50c Change default color from Transparent to Black 2026-06-02 11:47:47 +03:00
Lizayaro 0708ec927c Revise API token section in Readme.md
Updated API token acquisition instructions and links.
2026-06-01 20:14:38 +03:00
Lizayaro 9e43b59148 Add example workflow note to Readme
Added a note about example workflow for video loading and previewing.
2026-06-01 20:09:38 +03:00
Lizayaro ed4e307625 Add files via upload 2026-06-01 18:13:10 +03:00
Ubuntu 4bd6cedc90 WAI-4807 2026-06-01 15:06:15 +00:00
Yazan Numoor 12357dfa88 Bump version to 2.1.18 2026-05-05 12:10:17 +03:00
Yazan Numoor 97a7b41718 Merge pull request #45 from Bria-AI/WAI-4748
WAI-4748
2026-05-05 12:09:57 +03:00
4 changed files with 170 additions and 7 deletions
+2 -4
View File
@@ -8,10 +8,7 @@ This repository provides custom nodes for ComfyUI, enabling direct access to **B
BRIA's APIs and models are built for commercial use and trained on 100% licensed data and does not contain copyrighted materials, such as fictional characters, logos, trademarks, public figures, harmful content, or privacy-infringing content. BRIA's APIs and models are built for commercial use and trained on 100% licensed data and does not contain copyrighted materials, such as fictional characters, logos, trademarks, public figures, harmful content, or privacy-infringing content.
An API token is required to use the nodes in your workflows. Get started quickly here An API token is required to use the nodes in your workflows. Get yours at the [BRIA Platform](https://platform.bria.ai/organization-management/api-keys).
<a href="https://bria.ai/api/" style="text-decoration:none; vertical-align:middle;">
<img src="https://img.shields.io/badge/GET%20YOUR%20TOKEN-1000%20Free%20Calls-blue?style=flat-square" alt="Get Your Token" height="20">
</a>.
for direct API endpoint use, you can find our APIs through partners like [**fal.ai**](https://fal.ai/models?keywords=bria). for direct API endpoint use, you can find our APIs through partners like [**fal.ai**](https://fal.ai/models?keywords=bria).
For source code and weigths access, go to our [**Hugging Face**](https://huggingface.co/briaai) space. For source code and weigths access, go to our [**Hugging Face**](https://huggingface.co/briaai) space.
@@ -122,6 +119,7 @@ These nodes perform high-quality edits for a given video.
| **Bria Video Mask By Prompt** | Generates a mask video using a text prompt describing what to mask. | | **Bria Video Mask By Prompt** | Generates a mask video using a text prompt describing what to mask. |
| **Bria Video Mask By Key Points** | Generates a mask video using key-points guidance | | **Bria Video Mask By Key Points** | Generates a mask video using key-points guidance |
Check out the example workflow in the workflows/ folder to see how the nodes should be wired together for loading and previewing a video end-to-end.
## Attribution Node ## Attribution Node
@@ -14,6 +14,7 @@ class RemoveVideoBackgroundNode():
video_url (str): Local path or URL of the video to process. 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. 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". 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: Returns:
result_video_url (STRING): URL of the video with background removed. result_video_url (STRING): URL of the video with background removed.
@@ -41,6 +42,19 @@ class RemoveVideoBackgroundNode():
"mkv_vp9", "mkv_vp9",
"gif" "gif"
], {"default": "webm_vp9"}), ], {"default": "webm_vp9"}),
"background_color": ([
"Transparent",
"Black",
"White",
"Gray",
"Red",
"Green",
"Blue",
"Yellow",
"Cyan",
"Magenta",
"Orange"
], {"default": "Black"})
} }
} }
@@ -52,7 +66,7 @@ class RemoveVideoBackgroundNode():
def __init__(self): def __init__(self):
self.api_url = "https://engine.prod.bria-api.com/v2/video/edit/remove_background" 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="Black"):
if api_key.strip() == "" or api_key.strip() == "BRIA_API_TOKEN": if api_key.strip() == "" or api_key.strip() == "BRIA_API_TOKEN":
raise Exception("Please insert a valid API key.") raise Exception("Please insert a valid API key.")
video_path = None video_path = None
@@ -73,7 +87,8 @@ class RemoveVideoBackgroundNode():
payload = { payload = {
"video": input_video_url, "video": input_video_url,
"preserve_audio": preserve_audio, "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) headers = bria_json_headers(api_key)
+1 -1
View File
@@ -1,7 +1,7 @@
[project] [project]
name = "comfyui-bria-api" name = "comfyui-bria-api"
description = "Custom nodes for ComfyUI using BRIA's API." description = "Custom nodes for ComfyUI using BRIA's API."
version = "2.1.17" version = "2.1.19"
license = {file = "LICENSE"} license = {file = "LICENSE"}
[project.urls] [project.urls]
+150
View File
@@ -0,0 +1,150 @@
{
"id": "faacd69e-30b7-4ae8-a9e0-11e3523139f9",
"revision": 0,
"last_node_id": 14,
"last_link_id": 9,
"nodes": [
{
"id": 5,
"type": "LoadVideoFramesNode",
"pos": [
-377.4424627503264,
265.04224992480954
],
"size": [
270,
276.890625
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "video_path",
"type": "STRING",
"links": [
3
]
}
],
"properties": {
"Node name for S&R": "LoadVideoFramesNode"
},
"widgets_values": [
"6952253-uhd_3840_2160_25fps.mp4",
"image"
]
},
{
"id": 7,
"type": "RemoveVideoBackgroundNode",
"pos": [
176.90761152601942,
244.1153564319173
],
"size": [
550.953125,
348.203125
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"name": "video_url",
"type": "STRING",
"widget": {
"name": "video_url"
},
"link": 3
}
],
"outputs": [
{
"name": "result_video_url",
"type": "STRING",
"links": [
4
]
}
],
"properties": {
"Node name for S&R": "RemoveVideoBackgroundNode"
},
"widgets_values": [
"",
"",
true,
"webm_vp9"
]
},
{
"id": 8,
"type": "PreviewVideoURLNode",
"pos": [
1020.6454228509147,
264.9389174606007
],
"size": [
270,
252.890625
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "video_url",
"type": "STRING",
"widget": {
"name": "video_url"
},
"link": 4
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewVideoURLNode"
},
"widgets_values": [
""
]
}
],
"links": [
[
3,
5,
0,
7,
0,
"STRING"
],
[
4,
7,
0,
8,
0,
"STRING"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.43094644375454877,
"offset": [
685.6754838043107,
494.0393339664482
]
},
"frontendVersion": "1.43.18",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}