{
 "last_node_id": 25,
 "last_link_id": 23,
 "nodes": [
  {
   "id": 1,
   "type": "MarkdownNote",
   "pos": [
    0,
    -504.0
   ],
   "size": [
    640,
    334
   ],
   "flags": {},
   "order": 1,
   "mode": 0,
   "inputs": [],
   "outputs": [],
   "properties": {},
   "widgets_values": [
    "**Needs in ComfyUI's `input` folder:** `example.png`\n\nPromptable segmentation: a click at the image centre (positive_points = 384,384). Edit the point in pixels, add a box 'x0,y0,x1,y1' or negative points. The click lands on the dress only because the image centre happens to be there: move it to pick another object. Only the two bottom nodes (SAM 3, CLIPSeg) take a text prompt: edit `text` there ('pink dress', 'grass'); the point-based SAM nodes error on text, leave it empty. Compare SAM 2.1, MobileSAM and EfficientViT-SAM.\n\n**Orange group:** the same task in another pack; install it, or delete the group."
   ]
  },
  {
   "id": 2,
   "type": "LoadImage",
   "pos": [
    0.0,
    0.0
   ],
   "size": [
    300,
    340
   ],
   "flags": {},
   "order": 2,
   "mode": 0,
   "inputs": [],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      1,
      4,
      7,
      10,
      13,
      16,
      19
     ],
     "slot_index": 0
    },
    {
     "name": "MASK",
     "type": "MASK",
     "links": [],
     "slot_index": 1
    }
   ],
   "properties": {},
   "widgets_values": [
    "example.png",
    "image"
   ]
  },
  {
   "id": 3,
   "type": "FastforksSegment",
   "pos": [
    540.0,
    0.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 3,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 1
    }
   ],
   "outputs": [
    {
     "name": "mask",
     "type": "MASK",
     "links": [
      2
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "segment 1 (fastforks)",
   "widgets_values": [
    "sam2.1-hiera-small",
    "auto",
    "auto",
    "384,384",
    "",
    "",
    ""
   ]
  },
  {
   "id": 4,
   "type": "MaskToImage",
   "pos": [
    950.0,
    0.0
   ],
   "size": [
    200,
    30
   ],
   "flags": {},
   "order": 4,
   "mode": 0,
   "inputs": [
    {
     "name": "mask",
     "type": "MASK",
     "link": 2
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      3
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 5,
   "type": "PreviewImage",
   "pos": [
    1230.0,
    0.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 5,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 3
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 6,
   "type": "FastforksSegment",
   "pos": [
    540.0,
    420.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 6,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 4
    }
   ],
   "outputs": [
    {
     "name": "mask",
     "type": "MASK",
     "links": [
      5
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "segment 2 (fastforks)",
   "widgets_values": [
    "mobile-sam",
    "auto",
    "auto",
    "384,384",
    "",
    "",
    ""
   ]
  },
  {
   "id": 7,
   "type": "MaskToImage",
   "pos": [
    950.0,
    420.0
   ],
   "size": [
    200,
    30
   ],
   "flags": {},
   "order": 7,
   "mode": 0,
   "inputs": [
    {
     "name": "mask",
     "type": "MASK",
     "link": 5
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      6
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 8,
   "type": "PreviewImage",
   "pos": [
    1230.0,
    420.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 8,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 6
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 9,
   "type": "FastforksSegment",
   "pos": [
    540.0,
    840.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 9,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 7
    }
   ],
   "outputs": [
    {
     "name": "mask",
     "type": "MASK",
     "links": [
      8
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "segment 3 (fastforks)",
   "widgets_values": [
    "efficientvit-sam-l0",
    "auto",
    "auto",
    "384,384",
    "",
    "",
    ""
   ]
  },
  {
   "id": 10,
   "type": "MaskToImage",
   "pos": [
    950.0,
    840.0
   ],
   "size": [
    200,
    30
   ],
   "flags": {},
   "order": 10,
   "mode": 0,
   "inputs": [
    {
     "name": "mask",
     "type": "MASK",
     "link": 8
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      9
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 11,
   "type": "PreviewImage",
   "pos": [
    1230.0,
    840.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 11,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 9
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 12,
   "type": "FastforksSegment",
   "pos": [
    540.0,
    1260.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 12,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 10
    }
   ],
   "outputs": [
    {
     "name": "mask",
     "type": "MASK",
     "links": [
      11
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "segment 4 (fastforks)",
   "widgets_values": [
    "sam-vit-b",
    "auto",
    "auto",
    "384,384",
    "",
    "",
    ""
   ]
  },
  {
   "id": 13,
   "type": "MaskToImage",
   "pos": [
    950.0,
    1260.0
   ],
   "size": [
    200,
    30
   ],
   "flags": {},
   "order": 13,
   "mode": 0,
   "inputs": [
    {
     "name": "mask",
     "type": "MASK",
     "link": 11
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      12
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 14,
   "type": "PreviewImage",
   "pos": [
    1230.0,
    1260.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 14,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 12
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 15,
   "type": "FastforksSegment",
   "pos": [
    540.0,
    1700.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 15,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 13
    }
   ],
   "outputs": [
    {
     "name": "mask",
     "type": "MASK",
     "links": [
      14
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "sam3: text prompt",
   "widgets_values": [
    "sam3",
    "auto",
    "auto",
    "",
    "",
    "",
    "pink dress"
   ]
  },
  {
   "id": 16,
   "type": "MaskToImage",
   "pos": [
    950.0,
    1700.0
   ],
   "size": [
    200,
    30
   ],
   "flags": {},
   "order": 16,
   "mode": 0,
   "inputs": [
    {
     "name": "mask",
     "type": "MASK",
     "link": 14
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      15
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 17,
   "type": "PreviewImage",
   "pos": [
    1230.0,
    1700.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 17,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 15
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 18,
   "type": "FastforksSegment",
   "pos": [
    540.0,
    2120.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 18,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 16
    }
   ],
   "outputs": [
    {
     "name": "mask",
     "type": "MASK",
     "links": [
      17
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "clipseg: text prompt",
   "widgets_values": [
    "clipseg",
    "auto",
    "auto",
    "",
    "",
    "",
    "pink dress"
   ]
  },
  {
   "id": 19,
   "type": "MaskToImage",
   "pos": [
    950.0,
    2120.0
   ],
   "size": [
    200,
    30
   ],
   "flags": {},
   "order": 19,
   "mode": 0,
   "inputs": [
    {
     "name": "mask",
     "type": "MASK",
     "link": 17
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      18
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 20,
   "type": "PreviewImage",
   "pos": [
    1230.0,
    2120.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 20,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 18
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 21,
   "type": "DownloadAndLoadSAM2Model",
   "pos": [
    540.0,
    2630.0
   ],
   "size": [
    300,
    160
   ],
   "flags": {},
   "order": 21,
   "mode": 0,
   "inputs": [],
   "outputs": [
    {
     "name": "sam2_model",
     "type": "SAM2MODEL",
     "links": [
      20
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": [
    "sam2.1_hiera_small.safetensors",
    "single_image",
    "cuda",
    "fp16"
   ]
  },
  {
   "id": 22,
   "type": "PrimitiveString",
   "pos": [
    540.0,
    3330.0
   ],
   "size": [
    300,
    80
   ],
   "flags": {},
   "order": 22,
   "mode": 0,
   "inputs": [],
   "outputs": [
    {
     "name": "STRING",
     "type": "STRING",
     "links": [
      21
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "click point (JSON)",
   "widgets_values": [
    "[{\"x\": 384, \"y\": 384}]"
   ]
  },
  {
   "id": 23,
   "type": "Sam2Segmentation",
   "pos": [
    920.0,
    2850.0
   ],
   "size": [
    330,
    260
   ],
   "flags": {},
   "order": 23,
   "mode": 0,
   "inputs": [
    {
     "name": "sam2_model",
     "type": "SAM2MODEL",
     "link": 20
    },
    {
     "name": "image",
     "type": "IMAGE",
     "link": 19
    },
    {
     "name": "coordinates_positive",
     "type": "STRING",
     "link": 21
    },
    {
     "name": "coordinates_negative",
     "type": "STRING",
     "link": null
    },
    {
     "name": "bboxes",
     "type": "BBOX",
     "link": null
    },
    {
     "name": "mask",
     "type": "MASK",
     "link": null
    }
   ],
   "outputs": [
    {
     "name": "mask",
     "type": "MASK",
     "links": [
      22
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "segment-anything-2: SAM 2.1 small",
   "widgets_values": [
    false,
    false
   ]
  },
  {
   "id": 24,
   "type": "MaskToImage",
   "pos": [
    1330.0,
    2850.0
   ],
   "size": [
    200,
    30
   ],
   "flags": {},
   "order": 24,
   "mode": 0,
   "inputs": [
    {
     "name": "mask",
     "type": "MASK",
     "link": 22
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      23
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 25,
   "type": "PreviewImage",
   "pos": [
    1610.0,
    2850.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 25,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 23
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  }
 ],
 "links": [
  [
   1,
   2,
   0,
   3,
   0,
   "IMAGE"
  ],
  [
   2,
   3,
   0,
   4,
   0,
   "MASK"
  ],
  [
   3,
   4,
   0,
   5,
   0,
   "IMAGE"
  ],
  [
   4,
   2,
   0,
   6,
   0,
   "IMAGE"
  ],
  [
   5,
   6,
   0,
   7,
   0,
   "MASK"
  ],
  [
   6,
   7,
   0,
   8,
   0,
   "IMAGE"
  ],
  [
   7,
   2,
   0,
   9,
   0,
   "IMAGE"
  ],
  [
   8,
   9,
   0,
   10,
   0,
   "MASK"
  ],
  [
   9,
   10,
   0,
   11,
   0,
   "IMAGE"
  ],
  [
   10,
   2,
   0,
   12,
   0,
   "IMAGE"
  ],
  [
   11,
   12,
   0,
   13,
   0,
   "MASK"
  ],
  [
   12,
   13,
   0,
   14,
   0,
   "IMAGE"
  ],
  [
   13,
   2,
   0,
   15,
   0,
   "IMAGE"
  ],
  [
   14,
   15,
   0,
   16,
   0,
   "MASK"
  ],
  [
   15,
   16,
   0,
   17,
   0,
   "IMAGE"
  ],
  [
   16,
   2,
   0,
   18,
   0,
   "IMAGE"
  ],
  [
   17,
   18,
   0,
   19,
   0,
   "MASK"
  ],
  [
   18,
   19,
   0,
   20,
   0,
   "IMAGE"
  ],
  [
   19,
   2,
   0,
   23,
   1,
   "IMAGE"
  ],
  [
   20,
   21,
   0,
   23,
   0,
   "SAM2MODEL"
  ],
  [
   21,
   22,
   0,
   23,
   2,
   "STRING"
  ],
  [
   22,
   23,
   0,
   24,
   0,
   "MASK"
  ],
  [
   23,
   24,
   0,
   25,
   0,
   "IMAGE"
  ]
 ],
 "groups": [
  {
   "id": 1,
   "title": "Inputs",
   "bounding": [
    -30.0,
    -90.0,
    360.0,
    460.0
   ],
   "color": "#88A",
   "font_size": 24,
   "flags": {}
  },
  {
   "id": 2,
   "title": "fastforks",
   "bounding": [
    510.0,
    -90.0,
    1050.0,
    2540.0
   ],
   "color": "#3f789e",
   "font_size": 24,
   "flags": {}
  },
  {
   "id": 3,
   "title": "Other packs (install them, or delete this group)",
   "bounding": [
    510.0,
    2540.0,
    1430.0,
    900.0
   ],
   "color": "#b58b2a",
   "font_size": 24,
   "flags": {}
  }
 ],
 "config": {},
 "extra": {},
 "version": 0.4
}