Nodes/☁️BizyAir Nodes/☁️BizyAir LayerMask: SegmentAnythingUltra V2(Advance)
ComfyUI Node

☁️BizyAir LayerMask: SegmentAnythingUltra V2(Advance)

SegmentAnythingUltra V2 (BizyAir_SegmentAnythingUltraV2): ComfyUI Node Guide

By siliconflow·Created 2 years ago·Updated 11 months ago· 855
☁️BizyAir LayerMask: SegmentAnythingUltra V2(Advance)
  • image
  • image
  • mask
sam_model
grounding_dino_model
threshold0.30
detail_method
detail_erode6
detail_dilate6
black_point0.15
white_point0.99
process_detailtrue
promptsubject
device
max_megapixels2.0
cache_modeltrue

If you recognize the "😺dzNodes / LayerMask" naming, you've probably run into ComfyUI-LayerStyle before - this node is BizyAir's cloud-run copy of LayerStyle's SegmentAnythingUltra V2, same parameter set and everything. What it gives you over the plain point/box SAM node is two upgrades stacked together: you select the subject with a text prompt instead of clicking (GroundingDINO does the finding, SAM does the masking), and the output mask gets run through an actual matting pass afterward instead of stopping at a hard-edged segmentation boundary.

That matting step is the part worth understanding, because it's the difference between "good enough" and genuinely clean. A segmentation model draws a binary line: this pixel is foreground, that one isn't. That's structurally wrong for hair, fur, or anything with soft, semi-transparent edges - matting instead predicts a fractional alpha value per pixel, so a wisp of hair can be 40% opaque instead of forced to a hard yes/no. This node runs both stages: GroundingDINO finds the object from your prompt, SAM segments it, and then one of several matting algorithms refines the edge.

Inputs and outputs

There's a lot here, but only a handful matter for a first run:

  • prompt - plain text describing what to select, defaulting to "subject". This is what GroundingDINO searches for.
  • sam_model and grounding_dino_model - enums for which detection/segmentation weights to use (the sample values show sam_vit_h (2.56GB) and GroundingDINO_SwinT_OGC (694MB)), sized so you can see exactly why running this locally would be a commitment - and exactly why routing it through BizyAir's cloud instead is the appeal.
  • threshold - 0 to 1, default 0.3, GroundingDINO's detection confidence cutoff. Raise it if it's grabbing things you didn't ask for; lower it if it's missing the object.
  • detail_method - which matting algorithm refines the edge: VITMatte, VITMatte(local), PyMatting, or GuidedFilter. VITMatte is the modern deep-learning matting approach; PyMatting and GuidedFilter are lighter classical alternatives.
  • detail_erode / detail_dilate - both 1–255, default 6, controlling how far the matting pass looks inward and outward from the initial mask edge to resolve detail.
  • black_point / white_point - floats that set where the alpha output clips to fully transparent and fully opaque, defaulting to 0.15 and 0.99.
  • process_detail - boolean, on by default; turn it off to skip the matting refinement entirely and just get the raw SAM mask, which is faster if you don't need hair-level precision.
  • max_megapixels - caps the resolution the detail pass runs at, default 2.
  • cache_model - boolean, on by default, keeps the models warm between runs instead of reloading each time.
  • device - an enum currently offering only cuda.

It outputs image (the processed result) and mask (the refined alpha mask) - the mask is the one you'll actually chain into compositing or background-replacement.

Installing BizyAir

Through ComfyUI Manager, search "BizyAir" and install, or clone it manually:

cd ComfyUI/custom_nodes && git clone https://github.com/siliconflow/BizyAir.git

Restart ComfyUI, or run comfy node install bizyair if you're on Comfy-CLI. Set your API key on first use - the README's "click to login" link handles registration. This node in particular is a good example of why the cloud model matters: SAM ViT-H plus GroundingDINO plus a matting model is a real pile of VRAM and disk if you ran it locally, and BizyAir's whole pitch is you don't have to.

Common issues

Weak or wrong selections almost always come back to prompt and threshold - GroundingDINO is a real object detector, not magic, and a vague prompt or a threshold set too high will silently drop the object you wanted. Start with a specific noun phrase and lower the threshold before assuming the node is broken.

If matting looks worse than the plain mask, try toggling process_detail off to confirm the base segmentation is right first, then turn it back on and adjust detail_erode/detail_dilate - too much erosion on a thin subject (fingers, individual hair strands) can eat detail it should be preserving. And as with every node in this pack, a silent failure with no output is worth checking your API key for before anything else.

Category☁️BizyAir/😺dzNodes/LayerMask

Inputs (14)

NameTypeDefaultDescription
imageIMAGE
sam_modelCOMBO1 options: sam_vit_h (2.56GB)
grounding_dino_modelCOMBO1 options: GroundingDINO_SwinT_OGC (694MB)
thresholdFLOAT0.300–1
detail_methodCOMBO4 options: VITMatte, VITMatte(local), PyMatting, GuidedFilter
detail_erodeINT61–255
detail_dilateINT61–255
black_pointFLOAT0.150.01–0.98
white_pointFLOAT0.990.02–0.99
process_detailBOOLEANtrue
promptSTRINGsubject
deviceCOMBO1 options: cuda
max_megapixelsFLOAT2.01–999
cache_modelBOOLEANtrue

Outputs (2)

NameTypeDescription
imageIMAGE
maskMASK