Semantic Segmentor (legacy, alias for UniFormer)
The legacy alias that's really UniFormer under the hood
- image
- IMAGE
If you landed here from an old workflow or an old tutorial, here's the short version: SemSegPreprocessor is the legacy, generic name for the UniFormer segmentor. Same model, same output, same behavior - it's kept around so older graphs that reference the plain "segmentation" preprocessor don't break. If you're building something new, you'd usually pick the explicitly-named UniFormer-SemSegPreprocessor (or OneFormer for higher quality) instead. But functionally, this node does exactly what UniFormer does.
What it does
It turns a photo into a semantic segmentation map: every pixel labeled by category and painted the standard color for its class - sky, building, road, person, tree, and so on, from the ADE20K label set. That flat, blocky color map is a ControlNet condition. Feed it into a seg ControlNet (control_sd15_seg / control_v11p_sd15_seg on SD 1.5) and the model generates a new image that respects the regions - this area is a person, that one is sky - while your prompt handles all the styling. It's layout control without appearance control, which is the whole appeal of segmentation conditioning.
How it works
Under the hood this runs UniFormer, the lighter of the pack's two segmentation models, the one that maps to the original segmentation preprocessor keyword from the early ControlNet era. It classifies each pixel and assigns the canonical class color. The SemSegPreprocessor name is just the historical entry point to that same model - think of it as an alias, not a separate tool. The pack also ships OneFormer-ADE20K-SemSegPreprocessor, which is the heavier, more accurate option when this one's map comes out muddy.
The inputs that matter
Minimal by design. It takes an image and returns an IMAGE - the segmentation map - for your ControlNet Apply node. The only setting:
resolution(default 512) - working size; match your render.
Nothing to tune on the segmentation itself.
Installing it
ComfyUI Manager: search ComfyUI's ControlNet Auxiliary Preprocessors, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Fannovel16/comfyui_controlnet_aux
pip install -r requirements.txt
Restart ComfyUI. Because it's UniFormer, the weights (upernet_global_small.pth) download from HuggingFace on first run.
Where people get burned
The one that matters most in 2026: segmentation never got ported to the modern bases. Flux, Qwen-Image, and Z-Image unions cover canny, depth, pose, and edges - not segmentation. The newest place a seg ControlNet exists is SDXL's xinsir union, so run seg conditioning on SD 1.5 or SDXL, full stop. Second, if you're picking between nodes: this one and UniFormer-SemSegPreprocessor are the same thing, so don't agonize - and if you want better accuracy, jump straight to OneFormer. Finally, the pack-wide constant: the map is inert without a seg ControlNet loaded downstream. The preprocessor draws the layout; the ControlNet is what makes the model follow it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| resolutionopt | INT | 51264–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |