ComfyUI > Nodes > BRIA AI API nodes > Bria Replace Background

ComfyUI Node: Bria Replace Background

Class Name

ReplaceBgNode

Category
API Nodes
Author
BRIA AI (Account age: 1801days)
Extension
BRIA AI API nodes
Latest Updated
2025-03-17
Github Stars
0.04K

How to Install BRIA AI API nodes

Install this extension via the ComfyUI Manager by searching for BRIA AI API nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter BRIA AI API nodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Bria Replace Background Description

Powerful tool for AI artists to replace image backgrounds seamlessly using BRIA API, with advanced algorithms for creative flexibility.

Bria Replace Background:

The ReplaceBgNode is a powerful tool designed to seamlessly replace the background of an image using the BRIA API. This node is particularly beneficial for AI artists and designers who wish to enhance their images by altering the background without manually editing each image. By leveraging advanced algorithms, the node can intelligently identify and replace backgrounds based on user-defined prompts or reference images. This capability allows for creative flexibility, enabling you to transform the context of an image to better suit your artistic vision or project requirements. The node's integration with the BRIA API ensures high-quality results, making it an essential component for those looking to streamline their image editing process.

Bria Replace Background Input Parameters:

image

The image parameter is the primary input for the node, representing the image whose background you wish to replace. This parameter is crucial as it serves as the base for the background replacement process. The image should be provided in a compatible format, typically as an output from another node within the workflow.

api_key

The api_key is a string parameter required to authenticate your requests with the BRIA API. It ensures that you have the necessary permissions to access the API's background replacement services. The default value is set to "BRIA_API_TOKEN", but you should replace it with your actual API key to enable functionality.

fast

The fast parameter is a boolean that determines whether the background replacement process should prioritize speed over quality. When set to True, the process is expedited, which can be beneficial for quick previews or when working with a large batch of images. The default value is True.

bg_prompt

The bg_prompt is an optional string parameter that allows you to specify a textual description of the desired background. This prompt guides the API in generating a background that matches your creative intent. If not provided, the node may rely on other inputs like the reference image.

ref_image

The ref_image parameter is an optional image input that serves as a reference for the desired background. This can be particularly useful if you have a specific background in mind that you want to replicate or use as inspiration.

refine_prompt

The refine_prompt is a boolean parameter that, when enabled, allows the node to refine the background replacement process based on the provided prompt. This can enhance the accuracy and relevance of the background generated. The default value is True.

enhance_ref_image

The enhance_ref_image parameter is a boolean that, when set to True, enhances the quality of the reference image used in the background replacement process. This can lead to a more visually appealing result. The default value is True.

original_quality

The original_quality parameter is a boolean that determines whether the output image should maintain the original quality of the input image. When set to True, the node prioritizes preserving the input image's quality. The default value is False.

force_rmbg

The force_rmbg parameter is a boolean that forces the removal of the background, even if other conditions are not met. This can be useful in scenarios where you want to ensure the background is always replaced. The default value is False.

negative_prompt

The negative_prompt is an optional string parameter that specifies elements or features you want to avoid in the generated background. This helps in fine-tuning the output to better match your expectations.

seed

The seed parameter is an integer that sets the random seed for the background generation process. This can be used to ensure consistency across multiple runs by producing the same output for the same input. The default value is 681794.

content_moderation

The content_moderation parameter is a boolean that enables content moderation for the generated background. When set to True, it ensures that the output adheres to content guidelines and is free from inappropriate elements. The default value is False.

Bria Replace Background Output Parameters:

output_image

The output_image is the primary output of the node, representing the image with the newly replaced background. This output is crucial as it reflects the result of the background replacement process, incorporating any prompts or reference images provided. The image is returned in a format compatible with further processing or final use in your projects.

Bria Replace Background Usage Tips:

  • To achieve the best results, provide a clear and detailed bg_prompt that accurately describes the desired background. This helps the API generate a background that closely matches your vision.
  • Use the ref_image parameter when you have a specific background in mind. This can guide the API to produce a more accurate and visually appealing result.
  • If you need to process a large number of images quickly, consider setting the fast parameter to True to prioritize speed over quality.
  • Experiment with different seed values to explore various background options and find the one that best suits your needs.

Bria Replace Background Common Errors and Solutions:

Error: API request failed with status code <status_code>

  • Explanation: This error occurs when the API request is unsuccessful, possibly due to an invalid API key, network issues, or incorrect input parameters.
  • Solution: Verify that your api_key is correct and active. Check your network connection and ensure all required input parameters are provided correctly.

Error: Invalid image format

  • Explanation: This error indicates that the input image is not in a supported format, preventing the node from processing it.
  • Solution: Ensure that the image parameter is provided in a compatible format, such as JPEG or PNG, and is correctly output from a previous node.

Error: Missing required parameter: image

  • Explanation: This error occurs when the image parameter is not provided, which is essential for the background replacement process.
  • Solution: Make sure to supply an image to the image parameter, as it is necessary for the node to function correctly.

Bria Replace Background Related Nodes

Go back to the extension to check out more related nodes.
BRIA AI API nodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.