Generates a segmentation mask from a text prompt using CLIPSeg.
Works with numpy 2.x.
prompt:
Main text description of the region to segment, e.g. 'face' or 'person'.
Separate multiple prompts with '|' to average their heatmaps:
e.g. 'face | head | eyes'
threshold:
Sigmoid-normalised heatmap value above which a pixel is considered foreground.
Lower = larger mask, higher = tighter mask.
smooth_radius:
Gaussian blur applied to the heatmap before thresholding. Helps produce
cleaner soft edges. 0 = no smoothing.
model:
clipseg_rd64 – higher quality, ~350 MB download, slower
clipseg_rd16 – faster, ~100 MB, slightly lower quality
device:
auto = use cuda when available, else cpu. Models are cached in memory so
subsequent frames do not reload weights.
unload_after_run:
Free the model from memory after each execution. Enable to save VRAM when
this node is not used every frame.
By adampolczynski·Created 5 months ago·Updated 5 months ago· 1
◧ AP CLIPSeg Text Mask
image
mask
◄promptface►
◄threshold0.40►
◄smooth_radius4►
◄soft_masktrue►
◄invertfalse►
◄modelclipseg_rd64►
◄mask_dilate0►
◄mask_blur0►
◄deviceauto►
◄unload_after_runfalse►
CategoryAP ClipSEG Light
Inputs (11)
Name
Type
Default
Description
image
IMAGE
—
prompt
STRING
face
Text description of the region to mask. Use '|' to separate multiple prompts.