Transparency Background Remover (Batch)
The batch background remover that tunes itself per image
- images
- images
- masks
- report
If you've got a folder of images to cut - a sprite sheet, a product run, a stack of renders - the single-image node gets old fast. This is the pack's batch variant, and its one meaningful difference is that per-image auto-adjustment is ON by default. Every frame gets its own parameter tuning from content analysis instead of one settings profile applied blindly to the whole batch. That's exactly the difference that matters when your batch mixes dark and light backgrounds, or clean sprites with noisy photos.
You feed it images (plural - any batch tensor from a Load Images node) plus the base settings: tolerance, edge_sensitivity, foreground_bias, color_clusters, with auto_adjust defaulting to true. Optional controls are edge_refinement, dither_handling, binary_threshold, and progress_reporting. Worth noting what's not here: no output_size, no scaling_method. The batch node processes everything at original size, so if you want everything delivered at a fixed 1024 square, add a resize node after it.
Outputs
Three of them, and only two are normal: images and masks - stacked tensors in the same order you fed in, ready to feed a Save Image / Save Mask pair or further processing. The third is report, a STRING summary of the run, produced when progress_reporting is on. Stock ComfyUI has little that consumes a bare string, so treat it as a debug aid: flip progress_reporting on when a batch misbehaves and read what it tuned, flip it off when you don't want the overhead.
Install
Same pack, same steps as the flagship:
cd ComfyUI/custom_nodes
git clone https://github.com/Limbicnation/ComfyUI-TransparencyBackgroundRemover.git
cd ComfyUI-TransparencyBackgroundRemover
pip install -r requirements.txt
Or search "Transparency Background Remover" in ComfyUI Manager. Restart and it's under image/processing. Note this node does not need the heavier optional deps - it's the same CV engine as the flagship, so scikit-learn matters (install the pack's install.bat/install.sh if you see the sklearn warning) but ultralytics and the GrabCut machinery are irrelevant to it. The memory math is the usual batch concern: each image costs a few multiples of its own size in temporary buffers, so very large batches are better split up than run in one shot.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| tolerance | INT | 300–255 | Base color similarity threshold for background detection (0-255) |
| edge_sensitivity | FLOAT | 0.800–1 | Base edge detection sensitivity (0-1) |
| auto_adjust | BOOLEAN | true | Automatically adjust parameters based on image content |
| foreground_bias | FLOAT | 0.700–1 | Bias towards foreground preservation (0-1) |
| color_clusters | INT | 82–20 | Number of color clusters for background detection |
| edge_refinementopt | BOOLEAN | true | Apply edge refinement post-processing |
| dither_handlingopt | BOOLEAN | true | Enable dithered pattern detection and handling |
| binary_thresholdopt | INT | 1280–255 | Threshold for binary alpha mask (0-255) |
| progress_reportingopt | BOOLEAN | true | Generate detailed processing report |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| masks | MASK | — |
| report | STRING | — |