{
  "id": "b13968f1-cfe5-4646-9f22-ac07831aae2b",
  "revision": 0,
  "last_node_id": 33,
  "last_link_id": 41,
  "nodes": [
    {
      "id": 27,
      "type": "DownloadAndLoadFlorence2Model",
      "pos": [
        797.5498046875,
        435.3081359863281
      ],
      "size": [
        270,
        130
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [
        {
          "name": "lora",
          "shape": 7,
          "type": "PEFTLORA",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "florence2_model",
          "type": "FL2MODEL",
          "links": [
            28
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfyui-florence2",
        "ver": "de485b65b3e1b9b887ab494afa236dff4bef9a7e",
        "Node name for S&R": "DownloadAndLoadFlorence2Model"
      },
      "widgets_values": [
        "microsoft/Florence-2-base",
        "fp16",
        "sdpa",
        true
      ],
      "color": "#232",
      "bgcolor": "#353"
    },
    {
      "id": 30,
      "type": "Florence2toCoordinates",
      "pos": [
        1548.1920166015625,
        275.46484375
      ],
      "size": [
        270,
        102
      ],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [
        {
          "name": "data",
          "type": "JSON",
          "link": 36
        }
      ],
      "outputs": [
        {
          "name": "center_coordinates",
          "type": "STRING",
          "links": null
        },
        {
          "name": "bboxes",
          "type": "BBOX",
          "links": [
            37
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-segment-anything-2",
        "ver": "c59676b008a76237002926f684d0ca3a9b29ac54",
        "Node name for S&R": "Florence2toCoordinates"
      },
      "widgets_values": [
        "0",
        false
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 16,
      "type": "LoadImage",
      "pos": [
        797.5498046875,
        -13.30300235748291
      ],
      "size": [
        270,
        392.65997314453125
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            26,
            34,
            41
          ]
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": null
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.39",
        "Node name for S&R": "LoadImage"
      },
      "widgets_values": [
        "Clipboard - 2025-05-13 21.27.11.png",
        "image"
      ]
    },
    {
      "id": 29,
      "type": "InvertMask",
      "pos": [
        2183.08349609375,
        215.1739044189453
      ],
      "size": [
        140,
        26
      ],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "mask",
          "type": "MASK",
          "link": 38
        }
      ],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            35
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.39",
        "Node name for S&R": "InvertMask"
      },
      "widgets_values": []
    },
    {
      "id": 23,
      "type": "PreviewImage",
      "pos": [
        2585.65771484375,
        -6.269532203674316
      ],
      "size": [
        374.6875305175781,
        390.1878356933594
      ],
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 32
        }
      ],
      "outputs": [],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.39",
        "Node name for S&R": "PreviewImage"
      },
      "widgets_values": []
    },
    {
      "id": 32,
      "type": "Sam2Segmentation",
      "pos": [
        1870.6756591796875,
        216.38262939453125
      ],
      "size": [
        272.087890625,
        182
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [
        {
          "name": "sam2_model",
          "type": "SAM2MODEL",
          "link": 40
        },
        {
          "name": "image",
          "type": "IMAGE",
          "link": 41
        },
        {
          "name": "coordinates_positive",
          "shape": 7,
          "type": "STRING",
          "link": null
        },
        {
          "name": "coordinates_negative",
          "shape": 7,
          "type": "STRING",
          "link": null
        },
        {
          "name": "bboxes",
          "shape": 7,
          "type": "BBOX",
          "link": 37
        },
        {
          "name": "mask",
          "shape": 7,
          "type": "MASK",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "mask",
          "type": "MASK",
          "links": [
            38
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-segment-anything-2",
        "ver": "c59676b008a76237002926f684d0ca3a9b29ac54",
        "Node name for S&R": "Sam2Segmentation"
      },
      "widgets_values": [
        true,
        false
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 28,
      "type": "JoinImageWithAlpha",
      "pos": [
        2368.4716796875,
        -6.269532203674316
      ],
      "size": [
        176.86484375,
        46
      ],
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 34
        },
        {
          "name": "alpha",
          "type": "MASK",
          "link": 35
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            32
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.39",
        "Node name for S&R": "JoinImageWithAlpha"
      },
      "widgets_values": []
    },
    {
      "id": 33,
      "type": "DownloadAndLoadSAM2Model",
      "pos": [
        1548.1920166015625,
        82.7560043334961
      ],
      "size": [
        270,
        130
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "sam2_model",
          "type": "SAM2MODEL",
          "links": [
            40
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-segment-anything-2",
        "ver": "c59676b008a76237002926f684d0ca3a9b29ac54",
        "Node name for S&R": "DownloadAndLoadSAM2Model"
      },
      "widgets_values": [
        "sam2.1_hiera_base_plus.safetensors",
        "single_image",
        "cuda",
        "fp16"
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 25,
      "type": "Florence2Run",
      "pos": [
        1107.8709716796875,
        74.4581298828125
      ],
      "size": [
        400,
        364
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 26
        },
        {
          "name": "florence2_model",
          "type": "FL2MODEL",
          "link": 28
        }
      ],
      "outputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "links": []
        },
        {
          "name": "mask",
          "type": "MASK",
          "links": []
        },
        {
          "name": "caption",
          "type": "STRING",
          "links": null
        },
        {
          "name": "data",
          "type": "JSON",
          "links": [
            36
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfyui-florence2",
        "ver": "de485b65b3e1b9b887ab494afa236dff4bef9a7e",
        "Node name for S&R": "Florence2Run"
      },
      "widgets_values": [
        "goldfish",
        "caption_to_phrase_grounding",
        true,
        false,
        1024,
        3,
        true,
        "",
        1234,
        "fixed"
      ],
      "color": "#232",
      "bgcolor": "#353"
    }
  ],
  "links": [
    [
      26,
      16,
      0,
      25,
      0,
      "IMAGE"
    ],
    [
      28,
      27,
      0,
      25,
      1,
      "FL2MODEL"
    ],
    [
      32,
      28,
      0,
      23,
      0,
      "IMAGE"
    ],
    [
      34,
      16,
      0,
      28,
      0,
      "IMAGE"
    ],
    [
      35,
      29,
      0,
      28,
      1,
      "MASK"
    ],
    [
      36,
      25,
      3,
      30,
      0,
      "JSON"
    ],
    [
      37,
      30,
      1,
      32,
      4,
      "BBOX"
    ],
    [
      38,
      32,
      0,
      29,
      0,
      "MASK"
    ],
    [
      40,
      33,
      0,
      32,
      0,
      "SAM2MODEL"
    ],
    [
      41,
      16,
      0,
      32,
      1,
      "IMAGE"
    ]
  ],
  "groups": [],
  "config": {},
  "extra": {
    "ds": {
      "scale": 0.620921323059155,
      "offset": [
        -697.5498046875,
        113.30300235748291
      ]
    },
    "reroutes": [
      {
        "id": 1,
        "pos": [
          1829.7442626953125,
          3.2779242992401123
        ],
        "linkIds": [
          34,
          41
        ]
      }
    ],
    "linkExtensions": [
      {
        "id": 34,
        "parentId": 1
      },
      {
        "id": 41,
        "parentId": 1
      }
    ],
    "frontendVersion": "1.33.8",
    "VHS_latentpreview": false,
    "VHS_latentpreviewrate": 0,
    "VHS_MetadataImage": true,
    "VHS_KeepIntermediate": true
  },
  "version": 0.4
}