Isolate Input CLIPSeg (CRT)
Text-prompted cropping via CLIPSeg
- images
- cropped_images
- pipe
Meet the budget twin of Isolate Input SAM3.1 (CRT). Same job - find the subject you name in a batch of images or video frames, crop around it, hand a reconstruction pipe to Isolate Output (CRT) - but powered by CLIPSeg instead of SAM 3.1. CLIPSeg is a small text-prompted segmentation model: it reads "face" or "person" and produces a soft mask of where that thing is, no heavy segment-anything machinery required.
The practical difference is speed and weight. CLIPSeg is dramatically lighter and faster than SAM 3.1, and its model (Kijai's clipseg-rd64-refined-fp16) downloads once from Hugging Face and then just runs. The cost is precision: SAM 3.1 understands subjects and instances properly, while CLIPSeg is doing fuzzy text-to-mask matching. For a clean, static "find the face, crop it" job, CLIPSeg is often plenty and much snappier. For tracking a moving subject through a long video with confidence, you'll want the SAM version.
The inputs
Mostly the same surface as the SAM node, with two differences:
- No
single_itemtoggle - CLIPSeg doesn't do instance detection, so there's nothing to limit. You get whatever the mask finds. blur_sigmais CLIPSeg-specific: it blurs the mask before crop extraction, which smooths out the fuzzy CLIPSeg boundaries and keeps crops from jumping around frame to frame.
Shared knobs: what_to_detect (the text prompt), performance_preset (Fast/Balanced/Quality - defaults to Balanced here, a touch more conservative than the SAM node's Quality default, which tells you what the author thinks each is for), detect_chunk_size (default 10), padding, threshold (default 0.5 - higher than the SAM node's 0.3, again reflecting CLIPSeg's noisier masks), bbox_expansion, crop_smooth_alpha, and crop_megapixels.
Outputs are identical to the SAM version: cropped_images and a pipe bundle that CRT_IsolateOutput consumes unchanged - the CLIPSeg node was deliberately built to produce the same pipe structure, so you can swap the two input nodes freely in a workflow without touching the output side. That's a thoughtful design choice and it's the main reason to keep both nodes installed.
When to pick it
Use CLIPSeg when you want quick crops on a modest batch or an initial pass, or when the "subject" is more of a region ("the car", "the sign") than an instance. Use SAM 3.1 when the crop quality and subject consistency across a long video matter more than speed. The KB's background-removal guide makes a related point about mask quality that applies here too: CLIPSeg's masks are fuzzier, so lean on blur_sigma and bbox_expansion to keep the crop stable, and don't expect clean per-subject separation the way SAM gives you.
Install and gotchas
cd ComfyUI/custom_nodes
git clone https://github.com/PGCRT/CRT-Nodes.git
pip install -r requirements.txt
or ComfyUI Manager → search "CRT-Nodes". Unlike the SAM node, this one does not require the SAM3 PR in ComfyUI - it only needs the pack and transformers (in the requirements), which is a big part of its appeal as the low-friction option. Gotchas: the first run downloads the CLIPSeg model, and the mask quality on complex scenes can be genuinely bad - a prompt like "person" on a cluttered image will smear. Start with threshold at 0.5 and nudge down if the crop is too tight; if CLIPSeg keeps finding the wrong thing entirely, that's the cue to switch to the SAM node.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| what_to_detect | STRING | face | Text prompt used by CLIPSeg, for example 'face' or 'person'. |
| performance_preset | COMBO | Balanced | Fast = quickest detection, Balanced = default tradeoff, Quality = highest available quality in the current custom-node path and slower processing. |
| detect_chunk_size | INT | 100–4096 | Detection batch size. 0 = process the whole batch at once, 1 = per-image processing, 2+ = fixed chunk size. |
| padding | INT | 5120–2048 | Extra border added around the input batch before detection so subjects near the edges are not cropped too tightly. |
| threshold | FLOAT | 0.500–1 | Detection confidence threshold. Lower values find more mask areas, higher values are stricter. |
| blur_sigma | FLOAT | 0.00–100 | Optional blur applied to CLIPSeg masks before crop extraction. |
| bbox_expansion | FLOAT | 1.000.5–4 | Expands the detected crop box around the subject. Higher values give a looser crop. |
| crop_smooth_alpha | FLOAT | 0.650–1 | Temporal smoothing for crop position. Lower = steadier crop, higher = follows motion more closely. |
| crop_megapixels | FLOAT | 1.000–8 | Target resolution for the cropped output images. 0 disables crop rescaling. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| cropped_images | IMAGE | — |
| pipe | CRT_ISOLATE_PIPE | — |