Files
chflame163-ComfyUI_LayerStyle/workflow/sam2_ultra_example.json
T

888 lines
15 KiB
JSON

{
"last_node_id": 25,
"last_link_id": 37,
"nodes": [
{
"id": 2,
"type": "LoadImage",
"pos": {
"0": 60,
"1": 180,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 315,
"1": 314
},
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1,
6,
10,
18,
22,
25
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"seven_persons_1280x720.jpg",
"image"
]
},
{
"id": 6,
"type": "LayerMask: ObjectDetectorYOLOWorld",
"pos": {
"0": 491,
"1": 540,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 310.79998779296875,
"1": 206.62655639648438
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 6
}
],
"outputs": [
{
"name": "bboxes",
"type": "BBOXES",
"links": [
36
],
"slot_index": 0,
"shape": 3
},
{
"name": "preview",
"type": "IMAGE",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LayerMask: ObjectDetectorYOLOWorld"
},
"widgets_values": [
"yolo_world/v2-x",
0.05,
0.3,
"person",
"by_index",
"0,3,4"
]
},
{
"id": 4,
"type": "LayerMask: LoadFlorence2Model",
"pos": {
"0": 502,
"1": 132,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 301.9246520996094,
"1": 65.07791900634766
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "florence2_model",
"type": "FLORENCE2",
"links": [
2
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "LayerMask: LoadFlorence2Model"
},
"widgets_values": [
"base"
]
},
{
"id": 3,
"type": "LayerMask: ObjectDetectorFL2",
"pos": {
"0": 502,
"1": 247,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 302.3999938964844,
"1": 129.92591857910156
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1
},
{
"name": "florence2_model",
"type": "FLORENCE2",
"link": 2
}
],
"outputs": [
{
"name": "bboxes",
"type": "BBOXES",
"links": [
19
],
"slot_index": 0,
"shape": 3
},
{
"name": "preview",
"type": "IMAGE",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LayerMask: ObjectDetectorFL2"
},
"widgets_values": [
"women",
"all",
"0,"
]
},
{
"id": 12,
"type": "LayerMask: ObjectDetectorMask",
"pos": {
"0": 497,
"1": 815,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 298.78375244140625,
"1": 102
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "object_mask",
"type": "MASK",
"link": 16
}
],
"outputs": [
{
"name": "bboxes",
"type": "BBOXES",
"links": [
37
],
"slot_index": 0,
"shape": 3
},
{
"name": "preview",
"type": "IMAGE",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LayerMask: ObjectDetectorMask"
},
"widgets_values": [
"all",
"0,"
]
},
{
"id": 25,
"type": "LayerMask: BBoxJoin",
"pos": {
"0": 858,
"1": 687,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 252,
"1": 86
},
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "bboxes_1",
"type": "BBOXES",
"link": 36
},
{
"name": "bboxes_2",
"type": "BBOXES",
"link": 37
},
{
"name": "bboxes_3",
"type": "BBOXES",
"link": null
},
{
"name": "bboxes_4",
"type": "BBOXES",
"link": null
}
],
"outputs": [
{
"name": "bboxes",
"type": "BBOXES",
"links": [
33
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "LayerMask: BBoxJoin"
}
},
{
"id": 22,
"type": "LayerMask: SAM2Ultra",
"pos": {
"0": 1170,
"1": 550,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 315,
"1": 366
},
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 22
},
{
"name": "bboxes",
"type": "BBOXES",
"link": 33
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
24
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LayerMask: SAM2Ultra"
},
"widgets_values": [
"sam2_hiera_base_plus.safetensors",
"fp16",
"all",
"0,",
false,
"VITMatte",
6,
4,
0.15,
0.99,
true,
"cuda",
2
]
},
{
"id": 23,
"type": "LayerMask: SAM2Ultra",
"pos": {
"0": 1170,
"1": 980,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 315,
"1": 366
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 25
},
{
"name": "bboxes",
"type": "BBOXES",
"link": 26
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
27
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LayerMask: SAM2Ultra"
},
"widgets_values": [
"sam2_hiera_base_plus.safetensors",
"fp16",
"all",
"0,",
false,
"VITMatte",
6,
4,
0.15,
0.99,
true,
"cuda",
2
]
},
{
"id": 5,
"type": "PreviewImage",
"pos": {
"0": 1540,
"1": 130,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 607.5372314453125,
"1": 368.59552001953125
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 21
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 8,
"type": "PreviewImage",
"pos": {
"0": 1540,
"1": 550,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 607.5372314453125,
"1": 368.59552001953125
},
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 24
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 11,
"type": "PreviewImage",
"pos": {
"0": 1540,
"1": 970,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 607.5372314453125,
"1": 368.59552001953125
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 27
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 9,
"type": "LayerMask: ObjectDetectorYOLO8",
"pos": {
"0": 513,
"1": 1103,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 301.3816833496094,
"1": 157.36773681640625
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 10
}
],
"outputs": [
{
"name": "bboxes",
"type": "BBOXES",
"links": [
26
],
"slot_index": 0,
"shape": 3
},
{
"name": "preview",
"type": "IMAGE",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LayerMask: ObjectDetectorYOLO8"
},
"widgets_values": [
"face_yolov8m.pt",
"by_index",
"1,2,3,5,6"
]
},
{
"id": 15,
"type": "LoadImage",
"pos": {
"0": 57,
"1": 792,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": [
320.16066817973604,
310.2105949521583
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": [
16
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"clipspace/clipspace-mask-122198.png [input]",
"image"
]
},
{
"id": 21,
"type": "LayerMask: SAM2Ultra",
"pos": {
"0": 1170,
"1": 120,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"size": {
"0": 315,
"1": 366
},
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 18
},
{
"name": "bboxes",
"type": "BBOXES",
"link": 19
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
21
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LayerMask: SAM2Ultra"
},
"widgets_values": [
"sam2_hiera_base_plus.safetensors",
"fp16",
"all",
"0,",
false,
"VITMatte",
6,
4,
0.15,
0.99,
true,
"cuda",
2
]
}
],
"links": [
[
1,
2,
0,
3,
0,
"IMAGE"
],
[
2,
4,
0,
3,
1,
"FLORENCE2"
],
[
6,
2,
0,
6,
0,
"IMAGE"
],
[
10,
2,
0,
9,
0,
"IMAGE"
],
[
16,
15,
1,
12,
0,
"MASK"
],
[
18,
2,
0,
21,
0,
"IMAGE"
],
[
19,
3,
0,
21,
1,
"BBOXES"
],
[
21,
21,
0,
5,
0,
"IMAGE"
],
[
22,
2,
0,
22,
0,
"IMAGE"
],
[
24,
22,
0,
8,
0,
"IMAGE"
],
[
25,
2,
0,
23,
0,
"IMAGE"
],
[
26,
9,
0,
23,
1,
"BBOXES"
],
[
27,
23,
0,
11,
0,
"IMAGE"
],
[
33,
25,
0,
22,
1,
"BBOXES"
],
[
36,
6,
0,
25,
0,
"BBOXES"
],
[
37,
12,
0,
25,
1,
"BBOXES"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.751314800901578,
"offset": [
412.8676235805176,
29.36872079491155
]
}
},
"version": 0.4
}