Generated reference · ComfyUI workflow · chroma

SAM 3 Segment → Chroma Inpaint

Segment a region by text with SAM 3.1 on ComfyUI's core nodes, then repaint it with a Chroma checkpoint from the prompt. The mask used is saved as a second image.

chroma19nodesGPU A5000out image~55sv1.0.0

On this page
19Graph nodes
16Node classes
10Inputs
7Models

Tags: chromarunpod-serverlessvolume-backedsegmentationinpaintsam3

Inputs (10)#

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

promptstringrequireddefault a close-up photograph of a tiger's eye, intricately detailed fur, natural lighting, sharp focus, highest quality
Positive prompt in natural prose (Chroma responds to descriptive photography language)
negative_promptstringdefault This greyscale unfinished sketch has bad proportions, is featureless and disfigured. It is a blurry ugly mess with excessive gaussian blur, riddled with watermarks and signatures, smudged with leaking colors and nonsensical orientation of objects. Messy and abstract, filled with artifacts that disrupt the coherency of the composition, extreme chromatic aberrations and inconsistent lighting. Dull, monochrome colors and countless artistic errors.
Negative prompt (Chroma is CFG-guided, so this is honoured)
checkpointenumdefault chroma1-hd
Full-precision Chroma checkpoint on the network volume. ungloryhail-bf16 = UnGloryHail BF16 (A.03.01, Civitai model-version 2898818, the BF16 file 2776781 rather than the version's fp8 primary; content explicit; not rendered on a GPU yet, A.03.01 live still owed).
options: chroma1-hduncanny-v13-bf16photonic-fusion-debloated-bf16ungloryhail-bf16
stepsintegerdefault 26min 8max 60
Sampling steps (26 is the Chroma1-HD reference)
cfgfloatdefault 3.8min 1.0max 10.0
Classifier-free guidance (3.8 is the Chroma1-HD reference)
seedintegerdefault -1
Random seed (-1 = random)
source_imageimagerequired
Source image
text_promptstringrequireddefault the shirt
Concept to segment and repaint (SAM 3.1; at most 32 tokens per prompt). Each comma-separated prompt keeps its single best detection unless it ends in :N; every kept detection joins the repainted region.
confidence_thresholdfloatdefault 0.5min 0.05max 0.95
Minimum SAM 3.1 detection score (SAM3_Detect threshold)
grow_mask_byintegerdefault 12min 0max 64
Dilate the SAM 3 mask before inpainting

ComfyUI node graph (19)#

The executable ComfyUI prompt graph: 19 nodes across 16 distinct node classes, wired by 24 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: UNETLoader"] n1["2: CLIPLoader"] n2["3: VAELoader"] n3["4: ModelSamplingAuraFlow"] n4["5: T5TokenizerOptions"] n5["6: CLIPTextEncode"] n6["7: CLIPTextEncode"] n7["8: LoadImage"] n8["9: SAM3_Detect"] n9["10: GrowMask"] n10["11: VAEEncodeForInpaint"] n11["12: KSampler"] n12["13: VAEDecode"] n13["14: ImageCompositeMasked"] n14["15: SaveImage"] n15["16: SaveImage"] n16["17: CheckpointLoaderSimple"] n17["18: CLIPTextEncode"] n18["19: MaskToImage"] n0 -->|model| n3 n1 -->|clip| n4 n4 -->|clip| n5 n4 -->|clip| n6 n16 -->|model| n8 n7 -->|image| n8 n17 -->|conditioning| n8 n8 -->|mask| n9 n7 -->|pixels| n10 n2 -->|vae| n10 n9 -->|mask| n10 n3 -->|model| n11 n5 -->|positive| n11 n6 -->|negative| n11 n10 -->|latent_image| n11 n11 -->|samples| n12 n2 -->|vae| n12 n7 -->|destination| n13 n12 -->|source| n13 n9 -->|mask| n13 n13 -->|images| n14 n18 -->|images| n15 n16 -->|clip| n17 n8 -->|mask| n18
Data-flow DAG — scroll to zoom, drag to pan.

Nodes (19)#

1UNETLoadercore
unet_name = {{checkpoint_map[checkpoint]}} tmplweight_dtype = default
outputs: MODEL
2CLIPLoadercore
clip_name = t5xxl_fp16.safetensorstype = chromadevice = default
outputs: CLIP
3VAELoadercore
vae_name = ae.safetensors
outputs: VAE
4ModelSamplingAuraFlowcore
model = ◂ node 1 · out[0]shift = 1.0
outputs: MODEL
5T5TokenizerOptionscore
clip = ◂ node 2 · out[0]min_padding = 1min_length = 0
outputs: CLIP
6CLIPTextEncodecore
text = {{constructed_prompt}} tmplclip = ◂ node 5 · out[0]
outputs: CONDITIONING
7CLIPTextEncodecore
text = {{negative_prompt}} tmplclip = ◂ node 5 · out[0]
outputs: CONDITIONING
8LoadImagecore
image = {{source_image}} tmpl
outputs: IMAGEMASK
9SAM3_Detectcore
model = ◂ node 17 · out[0]image = ◂ node 8 · out[0]conditioning = ◂ node 18 · out[0]threshold = {{confidence_threshold}} tmplrefine_iterations = 2individual_masks = false
outputs: MASKBOUNDING_BOX
10GrowMaskcore
mask = ◂ node 9 · out[0]expand = {{grow_mask_by}} tmpltapered_corners = true
outputs: MASK
11VAEEncodeForInpaintcore
pixels = ◂ node 8 · out[0]vae = ◂ node 3 · out[0]mask = ◂ node 10 · out[0]grow_mask_by = 6
outputs: LATENT
12KSamplercore
model = ◂ node 4 · out[0]positive = ◂ node 6 · out[0]negative = ◂ node 7 · out[0]latent_image = ◂ node 11 · out[0]seed = {{seed}} tmplsteps = {{steps}} tmplcfg = {{cfg}} tmplsampler_name = eulerscheduler = betadenoise = 1.0
outputs: LATENT
13VAEDecodecore
samples = ◂ node 12 · out[0]vae = ◂ node 3 · out[0]
outputs: IMAGE
14ImageCompositeMaskedcore
destination = ◂ node 8 · out[0]source = ◂ node 13 · out[0]x = 0y = 0resize_source = falsemask = ◂ node 10 · out[0]
outputs: IMAGE
15SaveImagecore
images = ◂ node 14 · out[0]filename_prefix = isis/sam3-inpaint-color
16SaveImagecore
images = ◂ node 19 · out[0]filename_prefix = isis/sam3-inpaint-mask
17CheckpointLoaderSimplecore
ckpt_name = sam3.1_multiplex_fp16.safetensors
outputs: MODELCLIPVAE
18CLIPTextEncodecore
clip = ◂ node 17 · out[1]text = {{text_prompt}} tmpl
outputs: CONDITIONING
19MaskToImagecore
mask = ◂ node 9 · out[0]
outputs: IMAGE

Prompt construction#

template
{base_prompt}

Variables (1)#

base_prompt
{{prompt}} tmpl

Parameter banks (3)#

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

option_policy (1)#

checkpoint
{"chroma1-hd": {"distribution": "service", "content": "neutral"}, "uncanny-v13-bf16": {"distribution": "service", "content": "neutral"}, "photonic-fusion-debloated-bf16": {"distribution": "internal_only", "content": "neutral"}, "ungloryhail-bf16": {"distribution": "service", "content": "explicit"}}

checkpoint_map (4)#

chroma1-hd
Chroma1-HD.safetensors
uncanny-v13-bf16
uncannyPhotorealism_v13_bf16.safetensors
photonic-fusion-debloated-bf16
photonicFusionChroma_debloated_bf16.safetensors
ungloryhail-bf16
ungloryhail_bf16.safetensors

requires_families (2)#

sam31chroma-core

Models & dependencies#

Models required (7)#

Chroma1-HD.safetensors
uncannyPhotorealism_v13_bf16.safetensors
photonicFusionChroma_debloated_bf16.safetensors
ungloryhail_bf16.safetensors
t5xxl_fp16.safetensors
ae.safetensors
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": "Inpainted image with the segmented region regenerated"}
render_passes
{'pass': 'beauty', 'artifact_id': 'inpainted', 'format': 'png', 'required': True, 'description': 'Final inpainted composite'}{'pass': 'mask', 'artifact_id': 'mask', 'format': 'png', 'required': True, 'description': 'Segmentation mask that drove the inpaint'}

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
portrait-hero-image-bundle
outputPackageProfile
image-single-profile
controlModalities
controlnet-segmentationcontrolnet-inpaintmodel-locksampler-scheduler-lockseed-lock
consistencyDimensions
identitylightingenvironment
notes
SAM 3.1 segment (core SAM3_Detect) then Chroma inpaint in one graph.