Bira: Remove Image Background - After
Bira: Remove Image Background - Before

This workflow, titled 'Bira: Remove Image Background,' is designed to automate the process of removing backgrounds from images using the Bria API. It is particularly useful for users looking to streamline their image editing tasks, especially when dealing with large batches of images. The workflow begins by loading an image through the 'LoadImage' node, which prepares the file for processing. The core of the workflow is the 'BriaRemoveImageBackground' node, which interfaces with the Bria API to remove the background from the uploaded image. This process is handled asynchronously, allowing for efficient processing without requiring constant user input. Finally, the 'SaveImage' node is used to save the output image with a transparent background, ready for use in various applications like graphic design or product listings.

What makes this workflow particularly useful is its ability to handle complex image backgrounds with ease, thanks to the advanced capabilities of the Bria API. By leveraging the power of AI, this workflow can distinguish between the subject and the background, ensuring precise and clean extractions. The inclusion of the 'ImageCompare' node allows users to verify the quality of the background removal by comparing the original and edited images side by side, ensuring that the results meet their standards before finalizing the output.

API

Use this workflow from code

Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.

GET https://comfy.org/workflows/download/228fef3dbe05.json
Fetching workflow JSON…

Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.

# Install (beta)
pip install comfy-sdk        # Python
npm i @comfyorg/sdk          # TypeScript

# Run "Bira: Remove Image Background" (Python)
from comfy_sdk import Comfy

client = Comfy(api_key="comfyui-...")

# This workflow, exported in API format (see note below)
wf = client.workflows.from_file("utility_bria_remove_image_background_api.json")

asset = client.assets.from_file("input.png")
wf.set_input("26", "image", asset)  # LoadImage

job = client.run(wf)
for output in job.get_outputs("27"):  # SaveImage
    output.to_file(output.name)

The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key

FAQ

Frequently Asked Questions

View all workflows
Character
Cinematic
Image to Video
Lip Sync
Multiple Angles
Portrait
Style Reference
Style Transfer
Text to Video
Video Generation
Video
Showing 30 of 30 templates