[Inference.Core] UniFormer Segmentor
The standard semantic-segmentation preprocessor
- image
- IMAGE
This is the node that does the actual work - the one Inference_Core_SemSegPreprocessor in this same pack is just a legacy alias for. If you're starting fresh, this is the one to grab; the "SemSeg" name is only there for older workflows.
What it does and why you'd want it
It converts a photo into a semantic segmentation map - every region flat-colored by category rather than by edge or depth: sky here, building there, person over there, grass under it. UniFormer is the vision-transformer backbone doing the classifying, trained for this kind of per-region labeling. Feed the result into a Segmentation ControlNet and you're constraining the model on layout - "keep a person-shaped region here, a sky region up there" - while leaving it completely free on style, lighting, and how any of it actually looks. That's a genuinely different lever from Canny (which locks structure) or a depth map (which locks spatial arrangement): segmentation locks category and placement, nothing more.
Inputs and outputs
Deliberately simple - two fields:
image(required) - the photo you're segmenting.resolution(optional, default 512, range 64–2048) - working resolution for the pass. Roughly match your generation size for a cleaner-aligned map.
The output is a single IMAGE - the color-coded segmentation map - wired into a ControlNet Apply node alongside a segmentation-capable ControlNet. Like every preprocessor in this pack, this node only produces the hint image; the ControlNet model itself is a separate load.
The honest caveat: check this fits your base model first
Segmentation ControlNets are one of the conditions that didn't make the jump off SDXL. Every union ControlNet trained since 2024 - Flux, Qwen-Image, the newer 2026 bases - dropped segmentation from its menu; SDXL's xinsir union is essentially the last mainstream place a segment mode still exists. So before you build a whole pipeline around this preprocessor, make sure you've actually got a segmentation ControlNet checkpoint for the base model you're targeting - on a modern architecture, you probably don't, and the closest thing you'll find is a community model trained on a completely different scheme (Z-Image's SAM-based union segments by outline strokes, not by semantic class, so it isn't a drop-in swap). If you're on SD 1.5 or SDXL, though, this node is exactly what it says on the tin.
Installing it
ComfyUI Manager: search ComfyUI-Inference-Core-Nodes, install, restart - or use Stability Matrix's own Extensions Manager if that's how you run ComfyUI (LykosAI builds both). By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes
Then run install.py with ComfyUI's Python, or pick the pip extra matching your hardware: pip install -e .[cuda], .[cuda12], .[rocm], .[directml], or .[cpu]. These install the dependencies plus a compiled onnxruntime wheel for the parts of the pack that use it; a plain pip install -e . skips that acceleration if you don't need it. Restart ComfyUI. The UniFormer weights aren't shipped with the pack - the first run downloads them, so expect a one-time pause and make sure you have network access.
Where people get burned
The pack-wide gotcha: a ModuleNotFoundError: No module named 'inference_core_nodes' right after cloning, which is almost always the install step running against a different Python than the one ComfyUI actually uses - on portable/embedded builds, run it explicitly with the bundled python.exe -m pip. There are also scattered reports of this pack failing to import entirely on Mac; pip install -e .[cpu] is the extra to use there. And if you've also got the original comfyui_controlnet_aux pack installed alongside this one, you'll see near-identical "UniFormer" segmentation nodes from both packs in the node search - hover to confirm which pack a given node actually belongs to before you assume you're running this one.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| resolutionopt | INT | 51264–2048 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |