ComfyUI Node Runs on cloud

SAM Parameters

The config node behind WAS's Segment Anything pipeline

By WASasquatch·Created 3 years ago·Updated about a year ago· 1,812
SAM Parameters

      Meta's Segment Anything Model (SAM) can carve a clean mask out of an object given nothing more than a point click, a box, or a text prompt - no per-object training required, works on basically anything. WAS Node Suite wraps SAM into a small pipeline of its own: SAM Model Loader loads the model, SAM Parameters is where you define what you're actually asking it to segment, and SAM Image Mask runs the inference and returns the mask. This node is the middle piece - it doesn't touch pixels itself, it packages up the segmentation request.

      Why a separate parameters node

      This is a pattern you'll see a lot in WAS Node Suite: instead of cramming every setting onto the execution node, config gets split into its own node so you can build, save, and reuse it independently. SAM Parameters Combine exists for exactly this reason - it lets you merge multiple parameter sets together, so if you want to segment more than one region or point in a single pass, you build each set separately and combine them before handing the result to SAM Image Mask. It's a clean way to keep a segmentation request readable in a big graph instead of one node with a dozen crowded widgets.

      Where it sits versus the more common SAM path today

      If you've used Segment Anything in ComfyUI before, there's a decent chance it was through Impact Pack rather than this suite - Impact Pack's SAM integration rides alongside its FaceDetailer detect-crop-refine tooling and is actively maintained, while WAS's SAM nodes are one of the pack's original, unmaintained implementations. Both wrap the same underlying model. If you're already deep in an Impact Pack workflow, there's little reason to bring in WAS just for segmentation. If you're already running WAS for its other utilities and don't want to add a second pack for one feature, its native SAM Parameters → SAM Image Mask path still works.

      Installing it

      Through ComfyUI Manager: search "WAS Node Suite", install, restart. Manually:

      cd ComfyUI/custom_nodes
      git clone https://github.com/WASasquatch/was-node-suite-comfyui
      cd was-node-suite-comfyui
      pip install -r requirements.txt
      

      The SAM Model Loader downloads Meta's checkpoint on first use, so give that a minute and make sure the machine has network access the first time you run it.

      Troubleshooting

      Segmentation quality lives or dies on what you feed SAM as its guide - an ambiguous point near an object edge, or a box that includes two overlapping objects, gives SAM room to guess wrong. If SAM Image Mask returns garbage, revisit what SAM Parameters is actually specifying before blaming the model.

      The suite-wide caveat still applies: WAS Node Suite hasn't been updated since December 2023, and SAM's own checkpoint format and loading conventions have shifted since then in some newer wrappers. If SAM Model Loader fails to load a checkpoint you downloaded more recently, try grabbing the original SAM weights (sam_vit_h, sam_vit_l, or sam_vit_b) from Meta's own repo rather than a checkpoint packaged for a different, newer SAM-based node pack.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs