Imgutils Auto Segmenter
Anime-flavored background removal in one node
- image
- segmented_image
- segment_mask
The one-click subject extractor
Imgutils Auto Segmenter takes an image, separates the main subject from the background, and hands you both a cleaned-up image and the mask that did the separating. That's the whole job, and it's a job most people solve with a stack of rembg or BiRefNet nodes. This node is the imgutils-library take on it, with one important personality trait: it's tuned for anime and illustration rather than photographs. If your subjects are characters from a checkpoint that thinks in anime, this often beats the general-purpose cutout models on clean silhouettes.
How it works
Under the hood it calls imgutils.segment's ISNet-based functions (segment_rgba_with_isnetis / segment_with_isnetis). The segment_mode dropdown decides what you get back:
rgba_transparent- subject kept, background turned into real alpha transparency.rgb_white_bg- background replaced with white.rgb_black_bg- background replaced with black.
The scale input (default 1024, 128–2048) is the internal working resolution the model runs at - raise it for very detailed input, lower it if you're short on VRAM. Outputs are segmented_image and segment_mask, so you can either use the finished cutout or take the mask and run with it (into inpainting, compositing, whatever).
The honest caveat
It's a binary foreground/background segmenter. No instance separation, no "give me the person but not the chair behind them" - if the model thinks something is foreground, it's foreground. The README says this plainly ("仅能对图片进行前景和背景的分割"). For one clean subject on a plain background it's great; for a crowd scene you want Imgutils BBox Segmenter or a SAM-based approach instead. And if your content is photographic rather than anime, BiRefNet is the established default in this space - treat this node as the anime-first option, not a universal replacement.
Install
ComfyUI Manager → search "comfyui_imgutils", or:
cd ComfyUI/custom_nodes
git clone https://github.com/LK-168/comfyui_imgutils
Restart ComfyUI. The ISNet model downloads itself on first run into $HF_HOME - set that env var in your ComfyUI startup per the README (add it to run_nvidia_gpu.bat on the official Windows package; the Aki package handles it via .cache\huggingface\hub\). First run is the slow one.
Common issues
- Background still visible / half the subject missing. Edge cases on hair and thin structures are where every segmenter struggles - this one included. Check the
segment_maskoutput before blaming the image. - Very large images look mushy. Bump
scaletoward 2048 and re-run. - Batch inputs. It processes the first image of a batch only (the source prints a warning). Feed one at a time or loop.
One node, no graph assembly, no separate model loading - that's the appeal. When you just want the character out of the frame, it's the fastest path in this pack.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| segment_mode | COMBO | 3 options: rgba_transparent, rgb_white_bg, rgb_black_bg | |
| scale | INT | 1024128–2048 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| segmented_image | IMAGE | — |
| segment_mask | MASK | — |