Photoroom BG Remove v5.1.0
A paid-API background cutout that silently does nothing without a key
- images
- IMAGE
Unlike most nodes in this pack, the name here is not a lie: this one really does call the Photoroom API over the internet, and it really does need an API key. Photoroom's segmentation model is genuinely good - community consensus has it that their web tool beats most local background removers on hair and tricky edges. The catch is the cost structure: it's a cloud API, you pay per call, and the free tier caps the output resolution. If you're in a locked-down offline ComfyUI, this node is pointless; if you're in a shop already paying for Photoroom, it drops their segmentation into a batch workflow.
How it works
It's a thin wrapper around Photoroom's /v1/segment endpoint. For every image in the batch, the node writes a temp PNG into output/, POSTs it as multipart form data to sdk.photoroom.com with your key in an x-api-key header, downloads the returned cutout, reads it back with alpha intact, and reassembles the batch. Output is RGBA - transparent background, no mask node needed.
The only input is images (IMAGE), and the only output is the cutout IMAGE. That's it. Simple node.
The part that will quietly eat your workflow
Read this carefully: if the API key isn't set, the node doesn't error - it just returns your input images untouched. No warning, no red node, nothing. If your batch suddenly "stops removing backgrounds," this is why.
The key comes from a .env file in your ComfyUI working directory (the pack ships a .env_sample), or an environment variable:
# in the directory ComfyUI runs from, create .env with:
PHOTOROOM_API_KEY=your_key_here
The pack loads it via python-dotenv, and if the value is missing or empty it falls straight into pass-through mode. Also remember this is a cloud upload - your product photos leave the machine every run. And each image costs you a credit (or a bill line), so batch size times per-call pricing is your real budget.
Installing it
Same as every node in this pack - ComfyUI Manager, search "tri3d-comfyui-nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/TRI3D-LC/tri3d-comfyui-nodes
cd tri3d-comfyui-nodes
pip install -r requirements.txt
Restart, and it lands under the TRI3D category. requests and python-dotenv are the only deps this node personally needs, but the pack's requirements file installs a lot more - it's one big install serving a whole try-on pipeline.
Common issues
- Nothing happens / images pass through - key not set. See above.
- Error 4xx from the API - wrong or expired key, or you've hit Photoroom's rate/resolution limits on the free tier.
- Temp files piling up in
output/- every call writes aninput*.pngandoutput*.pnginto the ComfyUIoutputfolder and never cleans them up. Fine for a few runs, annoying at scale.
Honestly, if you're on a local-only setup, skip this and use a local BiRefNet or rembg node - it's free, private, and only slightly behind Photoroom on hard edges. Reach for this one specifically when you already pay for the API and want batch parity with the web tool.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |