Nodes/tri3d-comfyui-nodes/RemBG ClipDrop v5.1.0
ComfyUI Node

RemBG ClipDrop v5.1.0

ClipDrop's remove-background API as a ComfyUI node — key required, no local model

By TRI3D-LC·Created 3 years ago·Updated about a year ago· 27
RemBG ClipDrop v5.1.0
  • image
  • IMAGE

The display name here is "RemBG ClipDrop", which is exactly right and a little sneaky: this node doesn't run rembg and it doesn't run any local model at all. It uploads your image to Stability AI's ClipDrop API and downloads the cutout. No weights, no VRAM, no InSPyReNet download - but a CLIPDROP_API_KEY in a .env file and a paid API account, or the node just errors out.

What it does

One input - image. It encodes the image as JPEG, posts it to https://clipdrop-api.co/remove-background/v1 with the key from the CLIPDROP_API_KEY environment variable, and returns the API's response as an IMAGE. The return keeps four channels (RGBA) because the code converts BGRA2RGBA and hands the whole thing back - there's no separate MASK output, and the mask-splitting code in the source is commented out. If you need the alpha as a proper MASK, you'll split it yourself or use the pack's local tri3d-main_transparent_background instead.

The key facts:

  • You need an API key. CLIPDROP_API_KEY must be set, typically via a .env file in ComfyUI's working directory (the node uses python-dotenv to load it). Without it, the request goes out with an empty header, gets a 401, and raise_for_status() turns that into a hard error - no silent fallback here, unlike the pack's PhotoRoom node.
  • It's paid. ClipDrop's API is billed per call (free tier with limits). This is not a "local alternative" to anything - it's a cloud service in node clothing.
  • Quality is ClipDrop's, not yours. For clean edges it's genuinely good, which is why people pay for it. But you're also uploading your images to a third party - worth thinking about if your content isn't something you want leaving the machine.

Why it exists

The pack's author built a workflow that mixes local and cloud background removal, and this node is the cloud half. The practical use is quality: ClipDrop's segmentation handles hair and tricky edges better than base InSPyReNet, so it's a "send the hard ones to the API" node. For everything else, the local transparent-background path is free and offline.

Installing

ComfyUI Manager (search "tri3d"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/TRI3D-LC/tri3d-comfyui-nodes

Install requirements (pip install -r custom_nodes/tri3d-comfyui-nodes/requirements.txt) - requests and python-dotenv are the relevant ones. Then create a .env file in ComfyUI's working directory:

CLIPDROP_API_KEY=your_key_here

Restart and test.

Troubleshooting

  • HTTP 401 / 403 - the key is missing, mistyped, or lacks permission for this endpoint. Check the .env and that you're reading the right env var name (CLIPDROP_API_KEY).
  • HTTP 429 - quota exhausted. It's a paid API; budget accordingly.
  • 4-channel output breaks a downstream node - some nodes choke on RGBA. Convert to RGB with a color/alpha drop node before continuing.

If you're fine with the cost and the privacy trade-off, this is the easiest way to get ClipDrop-grade cutouts in a graph. If not, the pack's local node gives you 90% of it for free.

CategoryTRI3D

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE