ComfyUI Node

YOLOv8s Person Seg

The small-model person segmenter for when nano isn't cutting it

By Runware·Created 2 years ago·Updated about a month ago· 140
YOLOv8s Person Seg
  • image
  • image
settings.confidence0.50
settings.maskBlur5
settings.maskPadding10
settings.maxDetections6
ttlfalse
ttl_value60
outputFormatJPG

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.

CategoryRunware/Image/runware

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
settings.confidenceoptFLOAT0.500–1Confidence threshold for detections. Only detections above this score are included.
settings.maskBluroptINT50–100Blur radius for mask edges, creating smooth transitions.
settings.maskPaddingoptINT100–200Pixel amount to extend (positive) or shrink (negative) the mask area.
settings.maxDetectionsoptINT61–20Maximum number of detections. Prioritizes highest confidence scores if exceeded.
ttloptBOOLEANfalseEnable to set ttl. Off uses the model's default.
ttl_valueoptINT60Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.
outputFormatoptCOMBOJPGFile format for the generated image.

Outputs (1)

NameTypeDescription
imageIMAGE