Babel-Removebg
The cutout node that calls an API, not a model
- image
- IMAGE
Let's get the name out of the way, because it's the whole story: Babel-Removebg doesn't run any model on your machine. Despite the "api" in the pack title, that's not a typo or a marketing flourish - this node is a thin client for a hosted background-removal service at removebg-api.babel-hz.com. You feed it an image, it ships that image to a server in Hangzhou, and a few seconds later you get back a cutout. No VRAM, no checkpoint download, no models/ folder. If that tradeoff sounds good to you, read on; if you were hoping for a local BiRefNet in a cute package, this is the wrong node.
The hook: the node ships with the author's own API key and secret baked into config.json, so you can literally install it, wire up an image, and run - no signup, no credentials, no billing details. The author says there are "still several thousand images left" on the shared quota and asks for a star when it works. That's your warning too: a finite bucket of free cutouts, metered by a stranger's generosity.
What it does and why you'd care
One input, one output, that's the whole node. Drop in an image, get out the person with the background removed - it's a body remover, scoped to humans, not a general cutout tool. The README leans hard on "commercial-grade portrait segmentation, hair-level matting," and the OSS bucket it points to is literally named idphoto-output, so this is an ID-photo vendor's matting engine wearing a ComfyUI costume. If you're building a passport-photo or avatar pipeline, that's exactly the target it was trained for.
Where it beats the local crowd: you can run it on a potato. No GPU, no 3.5GB of weights, no ONNX fiddling. The catch is everything the KB's background-removal essay warns about with commercial services - your image leaves your machine, each call costs the shared quota, and there's per-request latency. For a one-off product shot it's fine. For batch work on 400 frames, get your own key or go local.
How it works
Under the hood (BabelApi.py) it's embarrassingly simple: your image gets JPEG-encoded at quality 90, base64-wrapped, and POSTed to https://removebg-api.babel-hz.com/task/cutoff/body with type: "foreground". The API returns a URL; the node downloads it, saves it as a temp PNG, converts it to a tensor, and deletes the file. Auth is a client-credentials token fetched from config.json's BABEL_KEY/BABEL_SECRET and cached for the session. Dependencies are just requests, Pillow, numpy and torch - all stuff a normal ComfyUI install already has, so there's no dependency rabbit hole.
The inputs and outputs that matter
- image (required, IMAGE): anything you can feed a Load Image into. Note the API caps resolution at 2000px for the shared tier, and it JPEG-flattens your input - if you feed it an image that already has transparency, that alpha is gone before the request is sent.
- IMAGE (output): the cutout. The PNG it fetches carries real alpha, which ComfyUI surfaces as a 4th channel on the tensor - so save it as PNG, and know that some downstream nodes quietly drop that alpha channel. The same gotcha the KB flags for LayerDiffusion applies here; check your save node.
Installing it
ComfyUI Manager, search "Babel Removebg", install, restart. Or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/bartly/Comfyui_babel_removebg_api
# restart ComfyUI
There are no model downloads and nothing heavy to install - the whole pack is two small Python files. The node shows up in the menu under Babel/removebg/body.
Where people get burned
- The quota is real. "Several thousand images" evaporates fast if you're not careful, and the shared key is the only thing in that
config.json. When calls start failing with a bad token or an empty response, that's usually the bucket running dry - the fix is signing up with Babel for your ownapikey/apisecretand editingconfig.json. - It needs the internet. Offline ComfyUI, this node is a paperweight.
- It writes a temp file (
<taskId>.png) into whatever directory ComfyUI runs from, then deletes it. Harmless, but if you're paranoid about your working dir, now you know. - One image per call. The node doesn't batch; feed it a batch of tensors and it'll misbehave. Loop it or process outside.
- Privacy. Your images are being uploaded to a third-party Chinese API. For your own selfies, fine. For a client's product catalog, think hard.
Honest verdict: it's a clever demo of a commercial API that works on day one, and for a quick human cutout it genuinely delivers. But since ComfyUI now ships BiRefNet natively and it's free, local and unlimited, reach for Babel when you're GPU-poor or want the vendor's hair-level matting - and keep the local path for the bulk work.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |