Generated reference · ComfyUI workflow · chroma

SAM 3 Segment by Text

Segment an image by a text concept with SAM 3.1 on ComfyUI's core nodes (SAM3_Detect). Outputs the RGBA cut-out and the mask image.

chroma13nodesGPU A5000out image~19sv1.0.0

On this page
13Graph nodes
11Node classes
5Inputs
1Models

Tags: chromarunpod-serverlessvolume-backedsegmentationsam3

Inputs (5)#

The typed parameter surface callers bind when they request this workflow. Enum options and numeric bounds are the values the workflow document declares.

source_imageimagerequired
Image to segment
text_promptstringrequireddefault the person
Concept to segment (SAM 3.1 promptable concept segmentation; at most 32 tokens per prompt). Each comma-separated prompt keeps its single best detection unless it ends in :N ("person:4" keeps up to four people); every kept detection is merged into one mask.
confidence_thresholdfloatdefault 0.5min 0.05max 0.95
Minimum detection score (SAM3_Detect threshold)
mask_blurintegerdefault 0min 0max 10
Gaussian blur on the mask edge, standard deviation in pixels. Capped at 10: core ImageBlur's kernel radius stops at 31 px, which is 3 standard deviations of 10.
mask_offsetintegerdefault 0min -64max 64
Grow (+) or shrink (-) the mask, in pixels (applied after the blur)

ComfyUI node graph (13)#

The executable ComfyUI prompt graph: 13 nodes across 11 distinct node classes, wired by 14 data dependencies. Nodes tinted green come from a custom node pack this workflow declares; the rest are ComfyUI core / baked-community classes.

flowchart TD n0["1: LoadImage"] n1["2: CheckpointLoaderSimple"] n2["3: CLIPTextEncode"] n3["4: SAM3_Detect"] n4["5: MaskToImage"] n5["6: ImageBlur"] n6["7: ImageToMask"] n7["8: GrowMask"] n8["9: InvertMask"] n9["10: JoinImageWithAlpha"] n10["11: SaveImage"] n11["12: MaskToImage"] n12["13: SaveImage"] n1 -->|clip| n2 n1 -->|model| n3 n0 -->|image| n3 n2 -->|conditioning| n3 n3 -->|mask| n4 n4 -->|image| n5 n5 -->|image| n6 n6 -->|mask| n7 n7 -->|mask| n8 n0 -->|image| n9 n8 -->|alpha| n9 n9 -->|images| n10 n7 -->|mask| n11 n11 -->|images| n12
Data-flow DAG — scroll to zoom, drag to pan.

Nodes (13)#

1LoadImagecore
image = {{source_image}} tmpl
outputs: IMAGEMASK
2CheckpointLoaderSimplecore
ckpt_name = sam3.1_multiplex_fp16.safetensors
outputs: MODELCLIPVAE
3CLIPTextEncodecore
clip = ◂ node 2 · out[1]text = {{text_prompt}} tmpl
outputs: CONDITIONING
4SAM3_Detectcore
model = ◂ node 2 · out[0]image = ◂ node 1 · out[0]conditioning = ◂ node 3 · out[0]threshold = {{confidence_threshold}} tmplrefine_iterations = 2individual_masks = false
outputs: MASKBOUNDING_BOX
5MaskToImagecore
mask = ◂ node 4 · out[0]
outputs: IMAGE
6ImageBlurcore
image = ◂ node 5 · out[0]blur_radius = {{min(31, 3 * mask_blur)}} tmplsigma = {{mask_blur / min(31, 3 * mask_blur)}} tmpl
outputs: IMAGE
7ImageToMaskcore
image = ◂ node 6 · out[0]channel = red
outputs: MASK
8GrowMaskcore
mask = ◂ node 7 · out[0]expand = {{mask_offset}} tmpltapered_corners = true
outputs: MASK
9InvertMaskcore
mask = ◂ node 8 · out[0]
outputs: MASK
10JoinImageWithAlphacore
image = ◂ node 1 · out[0]alpha = ◂ node 9 · out[0]
outputs: IMAGE
11SaveImagecore
images = ◂ node 10 · out[0]filename_prefix = isis/sam3-rgba
12MaskToImagecore
mask = ◂ node 8 · out[0]
outputs: IMAGE
13SaveImagecore
images = ◂ node 12 · out[0]filename_prefix = isis/sam3-mask

Parameter banks (1)#

The prompt / configuration lookup tables this workflow keys into from its inputs — the vocabulary that turns a style / palette / preset selection into graph parameters.

requires_families (1)#

sam31

Models & dependencies#

Models required (1)#

sam3.1_multiplex_fp16.safetensors

Output contract#

What a successful run of this workflow returns.

type
image
format
png
primary
{"type": "image", "format": "png", "description": "RGBA cut-out of the text-prompted segment"}
render_passes
{'pass': 'beauty', 'artifact_id': 'cutout', 'format': 'png', 'required': True, 'description': 'RGBA cut-out of the segmented subject'}{'pass': 'mask', 'artifact_id': 'mask', 'format': 'png', 'required': True, 'description': 'Segmentation mask from SAM3_Detect, after blur and offset'}

Taxonomy & routing#

How the control plane classifies this workflow — from the committed workflow-taxonomy-registry.json. It drives the consistency / control surface the agentic director can exercise over the workflow.

assetFamily
mkt-product-packshot-suite
outputPackageProfile
image-single-profile
controlModalities
controlnet-segmentationmodel-lock
consistencyDimensions
environment
notes
SAM 3.1 text-prompted concept segmentation on the core SAM3_Detect node.