{
  "id": "1d367ebe-cf07-4c87-b73a-db40277e6d53",
  "revision": 0,
  "last_node_id": 115,
  "last_link_id": 285,
  "nodes": [
    {
      "id": 106,
      "type": "PreviewImage",
      "pos": [
        -600,
        -3270
      ],
      "size": [
        350,
        390
      ],
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 281
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": null
        }
      ],
      "properties": {
        "Node name for S&R": "PreviewImage",
        "cnr_id": "comfy-core",
        "ver": "0.19.3",
        "enableTabs": false,
        "tabWidth": 65,
        "tabXOffset": 10,
        "hasSecondTab": false,
        "secondTabText": "Send Back",
        "secondTabOffset": 80,
        "secondTabWidth": 65
      }
    },
    {
      "id": 79,
      "type": "LoadImage",
      "pos": [
        -1990,
        -3270
      ],
      "size": [
        290,
        390
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            241,
            282
          ]
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": null
        }
      ],
      "properties": {
        "Node name for S&R": "LoadImage",
        "cnr_id": "comfy-core",
        "ver": "0.19.3",
        "enableTabs": false,
        "tabWidth": 65,
        "tabXOffset": 10,
        "hasSecondTab": false,
        "secondTabText": "Send Back",
        "secondTabOffset": 80,
        "secondTabWidth": 65
      },
      "widgets_values": [
        "neon_guitarist.png",
        "image"
      ],
      "widgets_values_named": {
        "image": "neon_guitarist.png",
        "upload": "image"
      }
    },
    {
      "id": 114,
      "type": "InvertMask",
      "pos": [
        -900,
        -3270
      ],
      "size": [
        210,
        30
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [
        {
          "name": "mask",
          "type": "MASK",
          "link": 285
        }
      ],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            284
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "InvertMask",
        "cnr_id": "comfy-core",
        "ver": "0.19.3"
      }
    },
    {
      "id": 111,
      "type": "JoinImageWithAlpha",
      "pos": [
        -900,
        -3180
      ],
      "size": [
        230,
        80
      ],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 282
        },
        {
          "name": "alpha",
          "type": "MASK",
          "link": 284
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            281
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "JoinImageWithAlpha",
        "cnr_id": "comfy-core",
        "ver": "0.19.3",
        "enableTabs": false,
        "tabWidth": 65,
        "tabXOffset": 10,
        "hasSecondTab": false,
        "secondTabText": "Send Back",
        "secondTabOffset": 80,
        "secondTabWidth": 65
      }
    },
    {
      "id": 99,
      "type": "6e7ab3ea-96aa-470f-9b94-3d9d0e01f481",
      "pos": [
        -1630,
        -3270
      ],
      "size": [
        290,
        370
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [
        {
          "label": "image",
          "name": "image",
          "type": "IMAGE",
          "link": 241
        },
        {
          "label": "object",
          "name": "text",
          "type": "STRING",
          "widget": {
            "name": "text"
          },
          "link": null
        },
        {
          "name": "bboxes",
          "shape": 7,
          "type": "BOUNDING_BOX",
          "link": null
        },
        {
          "name": "positive_coords",
          "shape": 7,
          "type": "STRING",
          "link": null
        },
        {
          "name": "negative_coords",
          "shape": 7,
          "type": "STRING",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "masks",
          "type": "MASK",
          "links": [
            242
          ]
        },
        {
          "name": "bboxes",
          "type": "BOUNDING_BOX",
          "links": []
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.19.3",
        "enableTabs": false,
        "tabWidth": 65,
        "tabXOffset": 10,
        "hasSecondTab": false,
        "secondTabText": "Send Back",
        "secondTabOffset": 80,
        "secondTabWidth": 65,
        "previewExposures": []
      },
      "widgets_values": [
        "guitar",
        0.5,
        2,
        false,
        "sam3.1_multiplex_fp16.safetensors"
      ],
      "widgets_values_named": {
        "text": "guitar",
        "threshold": 0.5,
        "refine_iterations": 2,
        "individual_masks": false,
        "ckpt_name": "sam3.1_multiplex_fp16.safetensors"
      }
    },
    {
      "id": 95,
      "type": "MaskPreview",
      "pos": [
        -1250,
        -3270
      ],
      "size": [
        310,
        390
      ],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [
        {
          "name": "mask",
          "type": "MASK",
          "link": 242
        }
      ],
      "outputs": [
        {
          "name": "mask",
          "type": "MASK",
          "links": [
            285
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "MaskPreview",
        "cnr_id": "comfy-core",
        "ver": "0.19.3",
        "enableTabs": false,
        "tabWidth": 65,
        "tabXOffset": 10,
        "hasSecondTab": false,
        "secondTabText": "Send Back",
        "secondTabOffset": 80,
        "secondTabWidth": 65
      }
    },
    {
      "id": 112,
      "type": "MarkdownNote",
      "pos": [
        -2550,
        -3270
      ],
      "size": [
        520,
        900
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "properties": {},
      "widgets_values": [
        "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Input Asset\n\n- [neon_guitarist.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/neon_guitarist.png)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/sam3.1](https://huggingface.co/Comfy-Org/sam3.1)\n\n**ModelScope mirrors** (alternative repo location)\n\n- [ModelScope:Comfy-Org/sam3.1](https://modelscope.cn/models/Comfy-Org/sam3.1)\n\n**checkpoints**\n\n- [sam3.1_multiplex_fp16.safetensors](https://huggingface.co/Comfy-Org/sam3.1/resolve/main/checkpoints/sam3.1_multiplex_fp16.safetensors) (1.63 GB)\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│   └── 📂 checkpoints/\n│       └── sam3.1_multiplex_fp16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
      ],
      "widgets_values_named": {
        "text": "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Input Asset\n\n- [neon_guitarist.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/neon_guitarist.png)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/sam3.1](https://huggingface.co/Comfy-Org/sam3.1)\n\n**ModelScope mirrors** (alternative repo location)\n\n- [ModelScope:Comfy-Org/sam3.1](https://modelscope.cn/models/Comfy-Org/sam3.1)\n\n**checkpoints**\n\n- [sam3.1_multiplex_fp16.safetensors](https://huggingface.co/Comfy-Org/sam3.1/resolve/main/checkpoints/sam3.1_multiplex_fp16.safetensors) (1.63 GB)\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│   └── 📂 checkpoints/\n│       └── sam3.1_multiplex_fp16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
      },
      "color": "#222",
      "bgcolor": "#000"
    },
    {
      "id": 113,
      "type": "MarkdownNote",
      "pos": [
        -1630,
        -2800
      ],
      "size": [
        300,
        380
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Note: Prompt format",
      "properties": {},
      "widgets_values": [
        "Max tokens for this model is only 32, to separately prompt multiple subjects you can separate prompts with comma, and set the max amount of objects detected for each prompt with :N\n\nFor example above test prompt finds 2 cakes, one apron, 4 window panels\n\n```\neye:2, window panels:4\n```\n\n\n\n"
      ],
      "widgets_values_named": {
        "text": "Max tokens for this model is only 32, to separately prompt multiple subjects you can separate prompts with comma, and set the max amount of objects detected for each prompt with :N\n\nFor example above test prompt finds 2 cakes, one apron, 4 window panels\n\n```\neye:2, window panels:4\n```\n\n\n\n"
      },
      "color": "#222",
      "bgcolor": "#000"
    }
  ],
  "links": [
    [
      241,
      79,
      0,
      99,
      0,
      "IMAGE"
    ],
    [
      242,
      99,
      0,
      95,
      0,
      "MASK"
    ],
    [
      281,
      111,
      0,
      106,
      0,
      "IMAGE"
    ],
    [
      282,
      79,
      0,
      111,
      0,
      "IMAGE"
    ],
    [
      284,
      114,
      0,
      111,
      1,
      "MASK"
    ],
    [
      285,
      95,
      0,
      114,
      0,
      "MASK"
    ]
  ],
  "groups": [],
  "definitions": {
    "subgraphs": [
      {
        "id": "6e7ab3ea-96aa-470f-9b94-3d9d0e01f481",
        "version": 1,
        "state": {
          "lastGroupId": 0,
          "lastNodeId": 115,
          "lastLinkId": 285,
          "lastRerouteId": 0
        },
        "revision": 0,
        "config": {},
        "name": "Image Segment (SAM3)",
        "inputNode": {
          "id": -10,
          "bounding": [
            -2260,
            -3450,
            144.369140625,
            228
          ]
        },
        "outputNode": {
          "id": -20,
          "bounding": [
            -1130,
            -3305,
            128,
            88
          ]
        },
        "inputs": [
          {
            "id": "a6e75fa2-162a-4af0-a2fd-1e9c899a5ab6",
            "name": "image",
            "type": "IMAGE",
            "linkIds": [
              264
            ],
            "localized_name": "image",
            "label": "image",
            "pos": [
              -2139.630859375,
              -3426
            ]
          },
          {
            "id": "3cefd304-7631-4ff6-a5a0-5a0ffb120745",
            "name": "text",
            "type": "STRING",
            "linkIds": [
              265
            ],
            "label": "object",
            "pos": [
              -2139.630859375,
              -3406
            ]
          },
          {
            "id": "1aec91c5-d8d2-441c-928c-49c14e7e80ed",
            "name": "bboxes",
            "type": "BOUNDING_BOX",
            "linkIds": [
              266
            ],
            "pos": [
              -2139.630859375,
              -3386
            ]
          },
          {
            "id": "1ec7ce1a-8257-4719-8a81-60ebc8a98899",
            "name": "positive_coords",
            "type": "STRING",
            "linkIds": [
              267
            ],
            "pos": [
              -2139.630859375,
              -3366
            ]
          },
          {
            "id": "c65f8b87-9bd7-48be-9fc2-823431e95019",
            "name": "negative_coords",
            "type": "STRING",
            "linkIds": [
              268
            ],
            "pos": [
              -2139.630859375,
              -3346
            ]
          },
          {
            "id": "bb4ba35a-ccfe-4c37-98e5-d9b0d69585fb",
            "name": "threshold",
            "type": "FLOAT",
            "linkIds": [
              269
            ],
            "pos": [
              -2139.630859375,
              -3326
            ]
          },
          {
            "id": "b1439668-b050-490b-a5dc-fc4052c55666",
            "name": "refine_iterations",
            "type": "INT",
            "linkIds": [
              270
            ],
            "pos": [
              -2139.630859375,
              -3306
            ]
          },
          {
            "id": "86e239e5-c098-4302-b54d-d42a38bc0f89",
            "name": "individual_masks",
            "type": "BOOLEAN",
            "linkIds": [
              271
            ],
            "pos": [
              -2139.630859375,
              -3286
            ]
          },
          {
            "id": "f9e0b9d4-b2f1-4907-a4a5-305656576706",
            "name": "ckpt_name",
            "type": "COMBO",
            "linkIds": [
              272
            ],
            "pos": [
              -2139.630859375,
              -3266
            ]
          }
        ],
        "outputs": [
          {
            "id": "ff50da09-1e59-4a58-9b7f-be1a00aa5913",
            "name": "masks",
            "type": "MASK",
            "linkIds": [
              231
            ],
            "localized_name": "masks",
            "pos": [
              -1106,
              -3281
            ]
          },
          {
            "id": "8f622e40-8528-4078-b7d3-147e9f872194",
            "name": "bboxes",
            "type": "BOUNDING_BOX",
            "linkIds": [
              232
            ],
            "localized_name": "bboxes",
            "pos": [
              -1106,
              -3261
            ]
          }
        ],
        "widgets": [],
        "nodes": [
          {
            "id": 78,
            "type": "CLIPTextEncode",
            "pos": [
              -1990,
              -3010
            ],
            "size": [
              400,
              200
            ],
            "flags": {},
            "order": 2,
            "mode": 0,
            "inputs": [
              {
                "localized_name": "clip",
                "name": "clip",
                "type": "CLIP",
                "link": 240
              },
              {
                "localized_name": "text",
                "name": "text",
                "type": "STRING",
                "widget": {
                  "name": "text"
                },
                "link": 265
              }
            ],
            "outputs": [
              {
                "localized_name": "CONDITIONING",
                "name": "CONDITIONING",
                "type": "CONDITIONING",
                "links": [
                  200
                ]
              }
            ],
            "properties": {
              "Node name for S&R": "CLIPTextEncode",
              "cnr_id": "comfy-core",
              "ver": "0.19.3",
              "enableTabs": false,
              "tabWidth": 65,
              "tabXOffset": 10,
              "hasSecondTab": false,
              "secondTabText": "Send Back",
              "secondTabOffset": 80,
              "secondTabWidth": 65
            },
            "widgets_values": [
              "guitar"
            ],
            "widgets_values_named": {
              "text": "guitar"
            }
          },
          {
            "id": 75,
            "type": "SAM3_Detect",
            "pos": [
              -1470,
              -3460
            ],
            "size": [
              270,
              260
            ],
            "flags": {},
            "order": 0,
            "mode": 0,
            "inputs": [
              {
                "label": "model",
                "localized_name": "model",
                "name": "model",
                "type": "MODEL",
                "link": 237
              },
              {
                "label": "image",
                "localized_name": "image",
                "name": "image",
                "type": "IMAGE",
                "link": 264
              },
              {
                "label": "conditioning",
                "localized_name": "conditioning",
                "name": "conditioning",
                "shape": 7,
                "type": "CONDITIONING",
                "link": 200
              },
              {
                "label": "bboxes",
                "localized_name": "bboxes",
                "name": "bboxes",
                "shape": 7,
                "type": "BOUNDING_BOX",
                "link": 266
              },
              {
                "label": "positive_coords",
                "localized_name": "positive_coords",
                "name": "positive_coords",
                "shape": 7,
                "type": "STRING",
                "link": 267
              },
              {
                "label": "negative_coords",
                "localized_name": "negative_coords",
                "name": "negative_coords",
                "shape": 7,
                "type": "STRING",
                "link": 268
              },
              {
                "localized_name": "threshold",
                "name": "threshold",
                "type": "FLOAT",
                "widget": {
                  "name": "threshold"
                },
                "link": 269
              },
              {
                "localized_name": "refine_iterations",
                "name": "refine_iterations",
                "type": "INT",
                "widget": {
                  "name": "refine_iterations"
                },
                "link": 270
              },
              {
                "localized_name": "individual_masks",
                "name": "individual_masks",
                "type": "BOOLEAN",
                "widget": {
                  "name": "individual_masks"
                },
                "link": 271
              }
            ],
            "outputs": [
              {
                "localized_name": "masks",
                "name": "masks",
                "type": "MASK",
                "links": [
                  231
                ]
              },
              {
                "localized_name": "bboxes",
                "name": "bboxes",
                "type": "BOUNDING_BOX",
                "links": [
                  232
                ]
              }
            ],
            "properties": {
              "Node name for S&R": "SAM3_Detect",
              "cnr_id": "comfy-core",
              "ver": "0.19.3",
              "enableTabs": false,
              "tabWidth": 65,
              "tabXOffset": 10,
              "hasSecondTab": false,
              "secondTabText": "Send Back",
              "secondTabOffset": 80,
              "secondTabWidth": 65
            },
            "widgets_values": [
              0.5,
              2,
              false
            ],
            "widgets_values_named": {
              "threshold": 0.5,
              "refine_iterations": 2,
              "individual_masks": false
            }
          },
          {
            "id": 77,
            "type": "CheckpointLoaderSimple",
            "pos": [
              -2000,
              -3220
            ],
            "size": [
              330,
              140
            ],
            "flags": {},
            "order": 1,
            "mode": 0,
            "inputs": [
              {
                "localized_name": "ckpt_name",
                "name": "ckpt_name",
                "type": "COMBO",
                "widget": {
                  "name": "ckpt_name"
                },
                "link": 272
              }
            ],
            "outputs": [
              {
                "localized_name": "MODEL",
                "name": "MODEL",
                "type": "MODEL",
                "links": [
                  237
                ]
              },
              {
                "localized_name": "CLIP",
                "name": "CLIP",
                "type": "CLIP",
                "links": [
                  240
                ]
              },
              {
                "localized_name": "VAE",
                "name": "VAE",
                "type": "VAE",
                "links": null
              }
            ],
            "properties": {
              "Node name for S&R": "CheckpointLoaderSimple",
              "cnr_id": "comfy-core",
              "ver": "0.19.3",
              "models": [
                {
                  "name": "sam3.1_multiplex_fp16.safetensors",
                  "url": "https://huggingface.co/Comfy-Org/sam3.1/resolve/main/checkpoints/sam3.1_multiplex_fp16.safetensors",
                  "directory": "checkpoints"
                }
              ],
              "enableTabs": false,
              "tabWidth": 65,
              "tabXOffset": 10,
              "hasSecondTab": false,
              "secondTabText": "Send Back",
              "secondTabOffset": 80,
              "secondTabWidth": 65
            },
            "widgets_values": [
              "sam3.1_multiplex_fp16.safetensors"
            ],
            "widgets_values_named": {
              "ckpt_name": "sam3.1_multiplex_fp16.safetensors"
            }
          }
        ],
        "groups": [],
        "links": [
          {
            "id": 237,
            "origin_id": 77,
            "origin_slot": 0,
            "target_id": 75,
            "target_slot": 0,
            "type": "MODEL"
          },
          {
            "id": 200,
            "origin_id": 78,
            "origin_slot": 0,
            "target_id": 75,
            "target_slot": 2,
            "type": "CONDITIONING"
          },
          {
            "id": 240,
            "origin_id": 77,
            "origin_slot": 1,
            "target_id": 78,
            "target_slot": 0,
            "type": "CLIP"
          },
          {
            "id": 231,
            "origin_id": 75,
            "origin_slot": 0,
            "target_id": -20,
            "target_slot": 0,
            "type": "MASK"
          },
          {
            "id": 232,
            "origin_id": 75,
            "origin_slot": 1,
            "target_id": -20,
            "target_slot": 1,
            "type": "BOUNDING_BOX"
          },
          {
            "id": 264,
            "origin_id": -10,
            "origin_slot": 0,
            "target_id": 75,
            "target_slot": 1,
            "type": "IMAGE"
          },
          {
            "id": 265,
            "origin_id": -10,
            "origin_slot": 1,
            "target_id": 78,
            "target_slot": 1,
            "type": "STRING"
          },
          {
            "id": 266,
            "origin_id": -10,
            "origin_slot": 2,
            "target_id": 75,
            "target_slot": 3,
            "type": "BOUNDING_BOX"
          },
          {
            "id": 267,
            "origin_id": -10,
            "origin_slot": 3,
            "target_id": 75,
            "target_slot": 4,
            "type": "STRING"
          },
          {
            "id": 268,
            "origin_id": -10,
            "origin_slot": 4,
            "target_id": 75,
            "target_slot": 5,
            "type": "STRING"
          },
          {
            "id": 269,
            "origin_id": -10,
            "origin_slot": 5,
            "target_id": 75,
            "target_slot": 6,
            "type": "FLOAT"
          },
          {
            "id": 270,
            "origin_id": -10,
            "origin_slot": 6,
            "target_id": 75,
            "target_slot": 7,
            "type": "INT"
          },
          {
            "id": 271,
            "origin_id": -10,
            "origin_slot": 7,
            "target_id": 75,
            "target_slot": 8,
            "type": "BOOLEAN"
          },
          {
            "id": 272,
            "origin_id": -10,
            "origin_slot": 8,
            "target_id": 77,
            "target_slot": 0,
            "type": "COMBO"
          }
        ],
        "extra": {}
      }
    ]
  },
  "config": {},
  "extra": {
    "ds": {
      "scale": 1.1581303000020047,
      "offset": [
        2775.147814738952,
        3413.2196577549735
      ]
    },
    "VHS_latentpreview": false,
    "VHS_latentpreviewrate": 0,
    "VHS_MetadataImage": true,
    "VHS_KeepIntermediate": true,
    "frontendVersion": "1.57.0"
  },
  "version": 0.4
}