YOLOv8s Person Seg
The small-model person segmenter for when nano isn't cutting it
- image
- image
YOLOv8s Person Seg is the "small" sibling of the pack's nano person segmenter, and the difference is the whole reason to reach for it: same task, better mask fidelity, slightly higher cost. If you've tried the nano version and watched it mangle a person's silhouette - the classic merge-between-two-overlapping-people failure, or ragged edges where the clothes meet the background - this is the tier up. It's still a cloud call, still one image input, still a mask out, just with more model under the hood.
Person segmentation is one of those jobs with a well-trodden ladder of quality, and knowing where this node sits on it saves you from re-rolling. The small YOLOv8 segmenter beats nano on edge coherence and small-person detection. It is not the top rung - dedicated matting models (BiRefNet and friends) do hair and semi-transparency better, and the ecosystem's default background-removal recommendation has moved to those. So the right mental model: this is the "person mask, decent fidelity, still cheap" tier - better than nano, cheaper than a matting model, and fine for compositing and mask-based editing where the subject doesn't have brutal hair.
How it works
An imageMasking task on Runware's cloud (runware:35@5): upload via the SDK, request over REST, mask downloads as an IMAGE. Same settings family as the nano node, and they matter the same way:
- settings.confidence (0.5) - person-detection threshold.
- settings.maskBlur (5) - edge smoothing for clean compositing.
- settings.maskPadding (10) - extend/shrink the mask by pixels; positive padding stops clipped edges.
- settings.maxDetections (6) - cap on people masked.
Output is image (IMAGE) - into your compositing, background, or inpaint workflow.
The inputs that matter
Required input: image. Start at confidence 0.5, maskPadding +10, maskBlur 5. If two people are merging into one blob, that's a maxDetections/confidence interaction - raise confidence to drop weak detections, or accept the merge and split manually.
Install and API key
Install once for the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Runware/ComfyUI-Runware
pip install -r ComfyUI-Runware/requirements.txt
Restart ComfyUI (or install Runware from ComfyUI Manager). API key from runware.ai/api-keys, set in ComfyUI Settings → Runware API key, exported as RUNWARE_API_KEY, or via runware auth login.
Gotchas
The honest guidance: if your job is "cut out a person with hair intact," skip both YOLO segmenters and use a matting/background-removal model - YOLO segmentation just isn't built for hair. Within the YOLO tier, the "s" model buys you cleaner edges and better small-person recall at a slightly higher per-call price; for one-off masks the cost difference is noise, for batch work it adds up. And remember the eternal cloud-vs-local math: YOLOv8 is MIT-ish open source and runs locally for free, so this node's value is convenience and zero local setup, not economics at scale. One image in, one mask out, billed per call - check one before you batch.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| settings.confidenceopt | FLOAT | 0.500–1 | Confidence threshold for detections. Only detections above this score are included. |
| settings.maskBluropt | INT | 50–100 | Blur radius for mask edges, creating smooth transitions. |
| settings.maskPaddingopt | INT | 100–200 | Pixel amount to extend (positive) or shrink (negative) the mask area. |
| settings.maxDetectionsopt | INT | 61–20 | Maximum number of detections. Prioritizes highest confidence scores if exceeded. |
| ttlopt | BOOLEAN | false | Enable to set ttl. Off uses the model's default. |
| ttl_valueopt | INT | 60 | Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`. |
| outputFormatopt | COMBO | JPG | File format for the generated image. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |