{
  "config": {},
  "extra": {
    "ds": {
      "offset": [
        6814.786728910573,
        -2844.678195884521
      ],
      "scale": 0.8390545288824184
    },
    "linearData": {
      "inputs": [
        [
          "2",
          "image"
        ],
        [
          "1",
          "prompt"
        ],
        [
          "1",
          "confidence_threshold"
        ],
        [
          "1",
          "background"
        ],
        [
          "1",
          "background_color"
        ]
      ],
      "outputs": [
        "3"
      ]
    },
    "linearMode": true
  },
  "groups": [],
  "id": "d2f0b975-ce5d-4913-951d-f73fca0ff2a4",
  "last_link_id": 4,
  "last_node_id": 7,
  "links": [
    [
      1,
      2,
      0,
      1,
      0,
      "IMAGE"
    ],
    [
      2,
      1,
      0,
      3,
      0,
      "IMAGE"
    ]
  ],
  "nodes": [
    {
      "bgcolor": "#364254",
      "color": "#222e40",
      "flags": {},
      "id": 1,
      "inputs": [
        {
          "link": 1,
          "localized_name": "image",
          "name": "image",
          "type": "IMAGE"
        },
        {
          "link": null,
          "localized_name": "prompt",
          "name": "prompt",
          "type": "STRING",
          "widget": {
            "name": "prompt"
          }
        },
        {
          "link": null,
          "localized_name": "output_mode",
          "name": "output_mode",
          "type": "COMBO",
          "widget": {
            "name": "output_mode"
          }
        },
        {
          "link": null,
          "localized_name": "confidence_threshold",
          "name": "confidence_threshold",
          "type": "FLOAT",
          "widget": {
            "name": "confidence_threshold"
          }
        },
        {
          "link": null,
          "localized_name": "max_segments",
          "name": "max_segments",
          "shape": 7,
          "type": "INT",
          "widget": {
            "name": "max_segments"
          }
        },
        {
          "link": null,
          "localized_name": "segment_pick",
          "name": "segment_pick",
          "shape": 7,
          "type": "INT",
          "widget": {
            "name": "segment_pick"
          }
        },
        {
          "link": null,
          "localized_name": "mask_blur",
          "name": "mask_blur",
          "shape": 7,
          "type": "INT",
          "widget": {
            "name": "mask_blur"
          }
        },
        {
          "link": null,
          "localized_name": "mask_offset",
          "name": "mask_offset",
          "shape": 7,
          "type": "INT",
          "widget": {
            "name": "mask_offset"
          }
        },
        {
          "link": null,
          "localized_name": "device",
          "name": "device",
          "shape": 7,
          "type": "COMBO",
          "widget": {
            "name": "device"
          }
        },
        {
          "link": null,
          "localized_name": "invert_output",
          "name": "invert_output",
          "shape": 7,
          "type": "BOOLEAN",
          "widget": {
            "name": "invert_output"
          }
        },
        {
          "link": null,
          "localized_name": "unload_model",
          "name": "unload_model",
          "shape": 7,
          "type": "BOOLEAN",
          "widget": {
            "name": "unload_model"
          }
        },
        {
          "link": null,
          "localized_name": "background",
          "name": "background",
          "shape": 7,
          "type": "COMBO",
          "widget": {
            "name": "background"
          }
        },
        {
          "link": null,
          "localized_name": "background_color",
          "name": "background_color",
          "shape": 7,
          "type": "COLORCODE",
          "widget": {
            "name": "background_color"
          }
        }
      ],
      "mode": 0,
      "order": 2,
      "outputs": [
        {
          "links": [
            2
          ],
          "localized_name": "IMAGE",
          "name": "IMAGE",
          "type": "IMAGE"
        },
        {
          "links": null,
          "localized_name": "MASK",
          "name": "MASK",
          "type": "MASK"
        },
        {
          "links": null,
          "localized_name": "MASK_IMAGE",
          "name": "MASK_IMAGE",
          "type": "IMAGE"
        }
      ],
      "pos": [
        -5293.835507251625,
        3025.4848379763685
      ],
      "properties": {
        "Node name for S&R": "SAM3Segment"
      },
      "size": [
        340,
        537.96875
      ],
      "type": "SAM3Segment",
      "widgets_values": [
        "character",
        "Merged",
        0.5,
        0,
        0,
        0,
        0,
        "Auto",
        false,
        false,
        "Alpha",
        "#222222"
      ]
    },
    {
      "flags": {},
      "id": 2,
      "inputs": [
        {
          "link": null,
          "localized_name": "image",
          "name": "image",
          "type": "COMBO",
          "widget": {
            "name": "image"
          }
        },
        {
          "link": null,
          "localized_name": "choose file to upload",
          "name": "upload",
          "type": "IMAGEUPLOAD",
          "widget": {
            "name": "upload"
          }
        }
      ],
      "mode": 0,
      "order": 0,
      "outputs": [
        {
          "links": [
            1
          ],
          "localized_name": "IMAGE",
          "name": "IMAGE",
          "type": "IMAGE"
        },
        {
          "links": null,
          "localized_name": "MASK",
          "name": "MASK",
          "type": "MASK"
        }
      ],
      "pos": [
        -5616.583132255222,
        3028.1069150131534
      ],
      "properties": {
        "Node name for S&R": "LoadImage"
      },
      "size": [
        282.796875,
        340
      ],
      "type": "LoadImage",
      "widgets_values": [
        "ed8482279eb2195686b31dfcba6e8d102c63cbbf4635d1db36669ff2aed86b20.png",
        "image"
      ]
    },
    {
      "flags": {},
      "id": 3,
      "inputs": [
        {
          "link": 2,
          "localized_name": "images",
          "name": "images",
          "type": "IMAGE"
        },
        {
          "link": null,
          "localized_name": "filename_prefix",
          "name": "filename_prefix",
          "type": "STRING",
          "widget": {
            "name": "filename_prefix"
          }
        }
      ],
      "mode": 0,
      "order": 3,
      "outputs": [],
      "pos": [
        -4919.286732547181,
        3025.4848379763685
      ],
      "properties": {},
      "size": [
        270,
        316
      ],
      "type": "SaveImage",
      "widgets_values": [
        "ComfyUI"
      ]
    },
    {
      "bgcolor": "#653",
      "color": "#432",
      "flags": {},
      "id": 7,
      "inputs": [],
      "mode": 0,
      "order": 1,
      "outputs": [],
      "pos": [
        -6415.24131747061,
        3020.2074950109204
      ],
      "properties": {},
      "size": [
        764.15625,
        1241.109375
      ],
      "type": "MarkdownNote",
      "widgets_values": [
        "# SAM3 Segmentation (RMBG) — Quick Guide\n\nThis node takes an **image** and a text **prompt**, then cuts out whatever the prompt describes. Everything else on the node can stay at defaults.\n\n## The two things that matter\n\n### 1. `image`\nConnect any image source (e.g. `Load Image`). That's the picture you want to pull something out of.\n\n### 2. `prompt`\nA short text description of **what to isolate**. The node segments whatever matches the prompt and removes the rest.\n\n## How to write the prompt\n\nKeep it **short, concrete, and noun-based**. You're naming a thing, not describing a scene.\n\n**Good prompts:**\n- `character`\n- `person`\n- `jacket`\n- `face`\n- `hair`\n- `car`\n- `dog`\n\n**Bad prompts:**\n- `the girl wearing a green bomber jacket standing against a wall` — too long, too descriptive\n- `cool anime vibes` — not an object\n- `remove background` — describes the action, not the subject\n\n## Rules of thumb\n\n- **One subject per prompt.** If you need two things, run the node twice or use a compound noun.\n- **Generic beats specific.** `character` works better than `anime girl with red hair`. Let the model find the obvious subject.\n- **Use the category, not the instance.** `jacket` rather than `green bomber jacket`.\n- **If it grabs the wrong thing**, try a broader word (`person` instead of `character`) or a more specific part (`face`, `torso`, `hands`).\n\n## Example\n\nWith the image on the left and prompt set to `character`, the node returns just the figure with the background cut away — which is exactly what the `Save Image` node outputs."
      ]
    }
  ],
  "revision": 0,
  "version": 0.4
}