yebisu0529-ship-it/ComfyUI-BEN3
ComfyUI nodes for local BEN3 background removal and mask output
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
ComfyUI-BEN3 is a Python custom-node extension that runs inference inside the ComfyUI workflow. BEN3 Model Loader resolves a local checkpoint or an auto: Hugging Face preset and sets inference precision and input size. BEN3 Remove Background takes the loaded model and an IMAGE batch, processes the frames in chunks, and returns an IMAGE plus a MASK. Keeping loading separate from image processing lets a graph share the configured model across removal nodes.
The package includes __init__.py, nodes.py, and ben3_runtime.py. BEN3 uses a DINOv3 ViT encoder through transformers’ DINOv3ViTConfig and DINOv3ViTModel, with encoder-layer key normalization across transformers 4.56.x and 5.x. The dependency manifests specify transformers>=4.56.0, safetensors, huggingface-hub, NumPy, Pillow, and OpenCV.
Key Capabilities & Differentiators
The loader accepts converted ben3.safetensors and ben3_fp16.safetensors as well as upstream ben3.pth. Inference input size is configurable from 256 to 2048 in increments of 16, defaulting to 1024. The removal node processes 1–64 frames per forward pass, defaulting to 4. CUDA auto mode uses fp16, an unsupported bf16 selection falls back to fp16 on GPU, and CPU inference always runs in fp32.
Input IMAGE tensors have shape [B, H, W, 3] or [B, H, W, 4]; any existing alpha channel is ignored. Transparent mode returns straight, non-premultiplied RGBA. Black, white, green, and custom six-digit hex backgrounds return composited RGB. The node also exposes the MASK for separate downstream use, and inversion applies to both that output and compositing. Video support here means processing batches of frames; temporal consistency is not established.
Trade-offs & Limitations
The direct comparison is ComfyUI’s built-in background-removal loader for BiRefNet. Both loaders list files from models/background_removal/, so seeing a checkpoint in the dropdown does not mean it is compatible: select only BEN3 weights in BEN3 Model Loader. The extension makes precision, frame chunking, and compositing explicit in the graph, but adds dependencies to the host environment. Choose between the two models using representative inputs, since there is no head-to-head quality or performance benchmark here.
Size VRAM on the target machine: start with smaller chunks and raise resolution or chunk size separately while measuring peak usage. Setting keep_model_loaded to false releases GPU residency after execution by moving the model to CPU and clearing the CUDA cache; repeated GPU runs then incur a transfer back to the device. For commercial use, verify the extension and weight terms separately, including DINOv3. The presence of LICENSE and DINOV3_LICENSE.md does not establish the applicable permissions by itself.
Hardware & Deployment Guide
The package declares Python >=3.9 and recommends ComfyUI >=0.21.0. Clone it into ComfyUI/custom_nodes, install requirements.txt with the Python environment that runs ComfyUI, and restart the host. For older ComfyUI versions, the extension registers models/background_removal/ at import time. Ensure transformers>=4.56.0 is installed, since the DINOv3 model and configuration classes are required.
For offline operation, stage the dependencies and place a BEN3 checkpoint in ComfyUI/models/background_removal/. The auto: presets use network access to retrieve weights from StudioYebisu-ship-it/BEN3-safetensors-ComfyUI or PramaLLC/BEN3; inference itself runs locally. CUDA enables the documented half-precision path, while CPU is an fp32 option. The package metadata lists version 0.1.0, but no GitHub release is listed, so release-to-release compatibility is not established.
Existing ComfyUI workflows that need local BEN3 cutouts and reusable masks for still images or batches of frames, with control over precision and chunk size.
You need a standalone inference API, guaranteed temporal consistency for video, or confirmed commercial redistribution rights before adoption.
Quick Start & Installation
cd ComfyUI/custom_nodes git clone https://github.com/yebisu0529-ship-it/ComfyUI-BEN3.git cd ComfyUI-BEN3 pip install -r requirements.txt
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/yebisu0529-ship-it/ComfyUI-BEN3.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about ComfyUI-BEN3
How do I wire BEN3 into a ComfyUI graph?
How should I size VRAM for large images or frame sequences?
Can I self-host it for commercial work or redistribute it with weights?
When should I choose BEN3 over ComfyUI’s built-in BiRefNet path?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy