✂️ Text Segmenter
Type 'person. cat. red car.' — get a clean cutout of each one, automatically
- image
- 抠图
- 遮罩
- 预览
The two-stage cutout - find the object, then cut it out cleanly - is the state of the art in background removal, and it combines the two models that the ecosystem has actually settled on. Stage one is Grounding DINO, which reads your text and returns a bounding box around whatever it names. Stage two is BiRefNet, which does the fine matting inside that box - the part that survives hair and fur, where simpler background removers fall apart. ✂️ Text Segmenter chains both, and the interface is just a text box.
Type person, get a person cut out. Type person. cat. red car. (English works best, and periods separate multiple targets) and it'll locate each one and produce a cutout. Leave the text empty and it skips the detection stage entirely, letting BiRefNet grab the salient foreground of the whole frame - which turns it into a high-quality background remover with zero prompting.
The pipeline and the inputs that matter
文字提示- your targets. The tooltip is worth reading: English works best,.separates multiple targets, empty = auto-foreground.识别严格度(0.05–0.95, default 0.35) - the detection threshold. Higher = stricter (only very obvious targets); lower = looser (finds more, risks false positives). 0.35 is a sane start.推理分辨率- BiRefNet's inference resolution: 512 / 1024 / 1536 / 2048. Higher is finer but slower and heavier; 1024 is the balanced default.羽化半径(0–30, default 2) - feathering on the mask edge. 0 = hard edge, 2 is a gentle default that hides the cutout seam.反转遮罩- invert the mask, i.e. keep the background instead of the subject.
Outputs: 抠图 (the cutout image), 遮罩 (the mask), and 预览 (a preview image). Cutout and mask are the useful ones; feed the mask to an inpainting or compositing stage.
The honest weight of this node
This is the heavyweight in the pack, and the README says so in plain numbers: first run downloads two models, ~1.3 GB total - Grounding DINO Tiny (~340 MB) and BiRefNet (~1 GB), fetched from HuggingFace on demand and cached locally. The node also auto-installs timm>=1.0.0 if it's missing, because BiRefNet's remote code needs it. So the first run isn't instant, and it needs disk and a few minutes of patience. After that, the models load from cache.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/LouisLU1997/ComfyUI-louis-use Louis_use
pip install -r requirements.txt
Or "Louis Use" via ComfyUI Manager, then restart. The requirements.txt pulls transformers, huggingface_hub, torchvision, and timm - ComfyUI usually has the first three, so timm is the one you're actually adding. You'll want a GPU with a couple GB free for the 1GB BiRefNet weights plus activations.
The take
For a text-driven cutout that handles the hard cases (hair, fabric), this is a genuinely good two-model pipeline with a one-line interface. The tradeoff is the 1.3 GB of downloads and the VRAM for BiRefNet. If you only need "remove the background," the empty-prompt mode is a strong remover but you're paying for DINO you don't use - a dedicated BiRefNet-only node might be leaner for that. If you need "cut out this specific thing by name," this is the node.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| 文字提示 | STRING | 英文效果最好;多目标用 '. ' 分隔;留空=自动抠前景 | |
| 识别严格度 | FLOAT | 0.350.05–0.95 | 数值越高越严格(只框非常明显的目标);越低越宽松(更容易找到目标,但可能误识别) |
| 推理分辨率 | COMBO | 1024 | BiRefNet 内部推理分辨率;越高越精细 |
| 羽化半径 | INT | 20–30 | 遮罩边缘羽化(像素),0=硬边 |
| 反转遮罩 | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 抠图 | IMAGE | — |
| 遮罩 | MASK | — |
| 预览 | IMAGE | — |