Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
822e3b2fac | ||
|
|
4974b03494 | ||
|
|
62dc71a50c | ||
|
|
0708ec927c | ||
|
|
9e43b59148 | ||
|
|
ed4e307625 | ||
|
|
4bd6cedc90 | ||
|
|
12357dfa88 | ||
|
|
97a7b41718 |
@@ -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.
|
||||
|
||||
An API token is required to use the nodes in your workflows. Get started quickly here
|
||||
<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>.
|
||||
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).
|
||||
|
||||
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.
|
||||
@@ -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 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
|
||||
|
||||
|
||||
@@ -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": "Black"})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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="Black"):
|
||||
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)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-bria-api"
|
||||
description = "Custom nodes for ComfyUI using BRIA's API."
|
||||
version = "2.1.17"
|
||||
version = "2.1.19"
|
||||
license = {file = "LICENSE"}
|
||||
|
||||
[project.urls]
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user