BiRefNet Portrait
Background removal that survives hair
- image
- image
The simplest node in this pack hides the most consequential quality jump. Runware_birefnet_portrait takes an IMAGE and returns the same image with the background removed - one input, one output, nothing else to tune. But the model behind it is BiRefNet, the bilateral-reference segmentation network that quietly replaced rembg's u2net as this ecosystem's default cutout tool, precisely because it stopped mangling hair, fur, and fabric mesh.
The "Portrait" in the name means the weights are tuned for people - subject segmentation on humans is the strongest case for the model, so if your workflow is compositing a person onto a new background, this is the node. It's a cloud call (removeBackground task, runware:112@10 AIR), so no model download, no ONNX runtime, no VRAM - wire an image in and get a clean cutout out.
How it works
You feed an IMAGE tensor, the node base64-encodes it and sends a removeBackground request to Runware, and the returned cutout (transparency preserved) comes back as an IMAGE with an alpha channel. Under the hood that's BiRefNet doing high-resolution segmentation on Runware's GPUs - the same weights that in ComfyUI core and rembg became the default remover because the edge quality finally made manual clean-up optional for most subjects.
The inputs that matter
Honestly? Almost none. The schema is:
image(required) - the input photo or render.ttl/ttl_value- how long the output URL stays live; only relevant if you're using URL output rather than the tensor.outputFormat- JPG/PNG/WEBP. Use PNG. JPG has no alpha channel, so a JPG cutout is a flat image with a baked-in background color - the entire point of this node dies in a JPG.outputQuality- compression quality, 95 default.
That's the whole node, and that's a compliment. There are no thresholds to calibrate because the network's the whole product.
Installing it
Install the pack, not the model. ComfyUI Manager → search Runware → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Runware/ComfyUI-Runware
pip install -r ComfyUI-Runware/requirements.txt
Key from runware.ai/api-keys → ComfyUI Settings → Runware API key (or RUNWARE_API_KEY). No BiRefNet weights download.
Where people get burned
- JPG output destroys the alpha. This is the #1 mistake. Set
outputFormatto PNG or the cutout is pointless. - Portrait weights ≠ general weights. This node is the portrait-tuned variant. For general objects, the same pack has
Runware_birefnet_general; if a non-human subject cuts badly here, that's the expected trade-off, not a bug. - It costs a little per image. Metered cloud call - cheap per cutout, but batch-cutting 500 images is a bill. It's still usually cheaper than the electricity for a local run at this quality.
- Hard edges can still win. Semi-transparent materials - veils, glass, wisps of smoke - defeat every background remover, BiRefNet included. Nobody has won that one.
For compositing people, BiRefNet Portrait is the current quality ceiling and this node is the lowest-friction way to reach it. One wire in, one wire out, better cutouts than the tools you were using.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| ttlopt | BOOLEAN | false | Enable to set ttl. Off uses the model's default. |
| ttl_valueopt | INT | 60 | Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`. |
| outputFormatopt | COMBO | JPG | File format for the generated image. |
| outputQualityopt | INT | 9520–99 | Compression quality of the output. Higher values preserve quality but increase file size. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |