Generated reference · ComfyUI workflow · chroma

Remove Background (BiRefNet)

Cut the subject out of an image with a BiRefNet matting variant (ComfyUI-RMBG). Outputs the RGBA cut-out and the mask as a second image.

chroma4nodesGPU A5000out image~8sv1.0.0

On this page
4Graph nodes
3Node classes
6Inputs
3Models

Tags: chromarunpod-serverlessvolume-backedbackground-removalmatting

Inputs (6)#

The typed parameter surface callers bind when they request this workflow. Enum options and numeric bounds are the values the workflow document declares.

source_imageimagerequired
Image to matte
modelenumdefault birefnet-hr-matting
Matting model (BiRefNet variants, MIT)
options: birefnet-portraitbirefnet-mattingbirefnet-hr-matting
sensitivityfloatdefault 1.0min 0.0max 1.0
Mask detection strength
mask_blurintegerdefault 0min 0max 64
Blur radius on the mask edge
mask_offsetintegerdefault 0min -20max 20
Grow (+) or shrink (-) the mask
refine_foregroundbooleandefault true
Fast foreground colour estimation on the cut-out edge

ComfyUI node graph (4)#

The executable ComfyUI prompt graph: 4 nodes across 3 distinct node classes, wired by 3 data dependencies. Nodes tinted green come from a custom node pack this workflow declares; the rest are ComfyUI core / baked-community classes.

flowchart TD n0["1: LoadImage"] n1["2: BiRefNetRMBG"] n2["3: SaveImage"] n3["4: SaveImage"] n0 -->|image| n1 n1 -->|images| n2 n1 -->|images| n3 classDef custom fill:#12b886,stroke:#0b6b4f,color:#04110c; class n1 custom;
Data-flow DAG — scroll to zoom, drag to pan.

Nodes (4)#

1LoadImagecore
image = {{source_image}} tmpl
outputs: IMAGEMASK
2BiRefNetRMBGcustom pack
image = ◂ node 1 · out[0]model = {{matte_option_map[model]}} tmplsensitivity = {{sensitivity}} tmplmask_blur = {{mask_blur}} tmplmask_offset = {{mask_offset}} tmplinvert_output = falserefine_foreground = {{refine_foreground}} tmplbackground = Alphabackground_color = #222222
outputs: IMAGEMASKMASK_IMAGE
3SaveImagecore
images = ◂ node 2 · out[0]filename_prefix = isis/removebg-rgba
4SaveImagecore
images = ◂ node 2 · out[2]filename_prefix = isis/removebg-mask

Parameter banks (2)#

The prompt / configuration lookup tables this workflow keys into from its inputs — the vocabulary that turns a style / palette / preset selection into graph parameters.

matte_option_map (3)#

birefnet-portrait
BiRefNet-portrait
birefnet-matting
BiRefNet-matting
birefnet-hr-matting
BiRefNet-HR-matting

requires_families (1)#

birefnet

Models & dependencies#

Custom node packs (1)#

The non-core ComfyUI node classes this graph requires; the RunPod worker image the workflow runs on must bake or install a pack that provides every one of them.

BiRefNetRMBG

Models required (3)#

BiRefNet-portrait.safetensors
BiRefNet-matting.safetensors
BiRefNet-HR-matting.safetensors

Output contract#

What a successful run of this workflow returns.

type
image
format
png
primary
{"type": "image", "format": "png", "description": "RGBA cut-out with the background removed"}
render_passes
{'pass': 'beauty', 'artifact_id': 'cutout', 'format': 'png', 'required': True, 'description': 'RGBA cut-out (SaveImage on the matte node image output)'}{'pass': 'mask', 'artifact_id': 'mask', 'format': 'png', 'required': True, 'description': 'Single-channel alpha matte (SaveImage on the matte node mask output)'}

Taxonomy & routing#

How the control plane classifies this workflow — from the committed workflow-taxonomy-registry.json. It drives the consistency / control surface the agentic director can exercise over the workflow.

assetFamily
mkt-product-packshot-suite
outputPackageProfile
image-single-profile
controlModalities
controlnet-segmentationmodel-lock
consistencyDimensions
environmentcolor-script
notes
BiRefNet matting cut-out with mask output.