Added Sam 3.1 Segmentation ComfyUI workflow
This commit is contained in:
parent
3478a6118e
commit
1f40714f85
3 changed files with 218 additions and 2 deletions
201
setup/Segmentation with SAM3-1.json
Normal file
201
setup/Segmentation with SAM3-1.json
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
{
|
||||
"163": {
|
||||
"inputs": {
|
||||
"image": ""
|
||||
},
|
||||
"class_type": "LoadImage",
|
||||
"_meta": {
|
||||
"title": "Load Image"
|
||||
}
|
||||
},
|
||||
"166": {
|
||||
"inputs": {
|
||||
"mask": [
|
||||
"174",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "InvertMask",
|
||||
"_meta": {
|
||||
"title": "Invert Mask"
|
||||
}
|
||||
},
|
||||
"167": {
|
||||
"inputs": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"offset_x": 0,
|
||||
"offset_y": 0,
|
||||
"destination": [
|
||||
"163",
|
||||
0
|
||||
],
|
||||
"source": [
|
||||
"169",
|
||||
0
|
||||
],
|
||||
"mask": [
|
||||
"166",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "ImageComposite+",
|
||||
"_meta": {
|
||||
"title": "🔧 Image Composite"
|
||||
}
|
||||
},
|
||||
"168": {
|
||||
"inputs": {
|
||||
"value": 0,
|
||||
"width": 1024,
|
||||
"height": 1024
|
||||
},
|
||||
"class_type": "SolidMask",
|
||||
"_meta": {
|
||||
"title": "Create Solid Mask"
|
||||
}
|
||||
},
|
||||
"169": {
|
||||
"inputs": {
|
||||
"mask": [
|
||||
"168",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "MaskToImage",
|
||||
"_meta": {
|
||||
"title": "Convert Mask to Image"
|
||||
}
|
||||
},
|
||||
"171": {
|
||||
"inputs": {
|
||||
"image": [
|
||||
"167",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "ImageListToBatch+",
|
||||
"_meta": {
|
||||
"title": "🔧 Image List To Batch"
|
||||
}
|
||||
},
|
||||
"172": {
|
||||
"inputs": {
|
||||
"image": [
|
||||
"173",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "ImageBatchToList+",
|
||||
"_meta": {
|
||||
"title": "🔧 Image Batch To List"
|
||||
}
|
||||
},
|
||||
"173": {
|
||||
"inputs": {
|
||||
"mask": [
|
||||
"164:75",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "MaskToImage",
|
||||
"_meta": {
|
||||
"title": "Convert Mask to Image"
|
||||
}
|
||||
},
|
||||
"174": {
|
||||
"inputs": {
|
||||
"red": 255,
|
||||
"green": 255,
|
||||
"blue": 255,
|
||||
"threshold": 0,
|
||||
"image": [
|
||||
"172",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "MaskFromColor+",
|
||||
"_meta": {
|
||||
"title": "🔧 Mask From Color"
|
||||
}
|
||||
},
|
||||
"175": {
|
||||
"inputs": {
|
||||
"filename_prefix": "Parts",
|
||||
"images": [
|
||||
"176",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "SaveImage",
|
||||
"_meta": {
|
||||
"title": "Save Image"
|
||||
}
|
||||
},
|
||||
"176": {
|
||||
"inputs": {
|
||||
"model": "RMBG-2.0",
|
||||
"sensitivity": 1,
|
||||
"process_res": 1024,
|
||||
"mask_blur": 0,
|
||||
"mask_offset": 0,
|
||||
"invert_output": false,
|
||||
"refine_foreground": true,
|
||||
"background": "Alpha",
|
||||
"background_color": "#222222",
|
||||
"image": [
|
||||
"171",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "RMBG",
|
||||
"_meta": {
|
||||
"title": "Remove Background (RMBG)"
|
||||
}
|
||||
},
|
||||
"164:78": {
|
||||
"inputs": {
|
||||
"text": "gloves, red vest, short pants, boots, necklace, white t-shirt",
|
||||
"clip": [
|
||||
"164:77",
|
||||
1
|
||||
]
|
||||
},
|
||||
"class_type": "CLIPTextEncode",
|
||||
"_meta": {
|
||||
"title": "CLIP Text Encode (Prompt)"
|
||||
}
|
||||
},
|
||||
"164:75": {
|
||||
"inputs": {
|
||||
"threshold": 0.1,
|
||||
"refine_iterations": 3,
|
||||
"individual_masks": true,
|
||||
"model": [
|
||||
"164:77",
|
||||
0
|
||||
],
|
||||
"image": [
|
||||
"163",
|
||||
0
|
||||
],
|
||||
"conditioning": [
|
||||
"164:78",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "SAM3_Detect",
|
||||
"_meta": {
|
||||
"title": "SAM3 Detect"
|
||||
}
|
||||
},
|
||||
"164:77": {
|
||||
"inputs": {
|
||||
"ckpt_name": "sam3.1_multiplex_fp16.safetensors"
|
||||
},
|
||||
"class_type": "CheckpointLoaderSimple",
|
||||
"_meta": {
|
||||
"title": "Load Checkpoint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -637,6 +637,17 @@
|
|||
"Outputs": [
|
||||
{ "Node": "7", "Name": "Save Mesh", "Type": "Mesh" }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Segmentation with SAM3-1",
|
||||
"File": "setup/Segmentation with SAM3-1.json",
|
||||
"Inputs": [
|
||||
{ "Node": "163", "Input": "image", "Name": "Source Image", "Type": "Image" },
|
||||
{ "Node": "164:78", "Input": "text", "Name": "Prompt", "Type": "String" }
|
||||
],
|
||||
"Outputs": [
|
||||
{ "Node": "175", "Name": "Save Images", "Type": "Image" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -433,7 +433,11 @@ function mapAssetRow(row) {
|
|||
const filename = toAssetUrlPath(row.filePath);
|
||||
const thumbnail = row.thumbnail ? toAssetUrlPath(row.thumbnail) : null;
|
||||
|
||||
if (row.cardId) {
|
||||
// Only surface a Kanban card id here. A graph asset is linked to a node-card
|
||||
// (kanbanColumnId IS NULL); exposing that id as metadata.cardId would make the
|
||||
// processing-snapshot machinery target the node-card, which has no column and
|
||||
// must not be renamed/repurposed. Graph assets keep their own stored cardId.
|
||||
if (row.cardId && row.kanbanColumnId != null) {
|
||||
metadata.cardId = row.clientKey || String(row.cardId);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue