Nodes/was-node-suite-comfyui/SAM Parameters Combine
ComfyUI Node Runs on cloud

SAM Parameters Combine

Merge multiple SAM point sets into one request

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

      WAS's Segment Anything pipeline is three nodes working together, not one: SAM Model Loader loads Meta's segmentation model, SAM Parameters is where you define what you're actually asking it to segment (the point coordinates that tell SAM what to grab), and SAM Image Mask runs the inference and hands back the mask. SAM Parameters Combine sits between the second and third steps - per the README, it exists to "combine SAM parameters," letting you merge more than one parameter set into a single request before it reaches SAM Image Mask.

      Why you'd want to merge parameter sets at all

      SAM Parameters packages up one segmentation ask - a set of point coordinates and labels. If you only need one object masked, one SAM Parameters node is all you need. But if you want SAM to grab several regions or several points in a single pass - two separate objects, or multiple points scattered across one complex shape to help SAM understand its full extent - you build each parameter set as its own SAM Parameters node, and Combine is what merges them into one bundle before handing it off. It's the same pattern WAS uses elsewhere in the suite: keep configuration in its own node so a busy graph stays readable, rather than cramming every setting onto the node that actually does the work.

      How it works

      It takes two (or more, chained) SAM parameter bundles and merges them into a single combined bundle with the same type, ready to feed straight into SAM Image Mask exactly the way a single SAM Parameters output would. The combined request carries every point/region definition from all the sets you fed in.

      The inputs and outputs that matter

      Two or more SAM_PARAMETERS inputs, one merged SAM_PARAMETERS output. It only makes sense wired between multiple SAM Parameters nodes and a single SAM Image Mask - on its own it doesn't touch an image or produce a mask, it's purely a merge step.

      Where WAS's SAM sits 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 actively-maintained FaceDetailer detect-crop-refine tooling, 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 this. If you're already running WAS for its other utilities and want to segment more than one region in a pass, this is the native path.

      Installing it

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

      cd ComfyUI/custom_nodes
      git clone https://github.com/WASasquatch/was-node-suite-comfyui
      

      install requirements.txt against your ComfyUI Python, restart. No model download of its own - SAM's checkpoint comes down separately via SAM Model Loader on first use.

      Common issues & troubleshooting

      Only one of my parameter sets seems to be respected. Before suspecting a bug, check the wiring - confirm every SAM Parameters node you built actually feeds into a Combine node, and that Combine's output (not one of the individual parameter nodes) is what's wired into SAM Image Mask. A dangling parameter set that never reached the combine step will silently be ignored.

      Segmentation quality is bad even after combining. Quality lives or dies on what each SAM Parameters node is actually specifying - an ambiguous point near an object edge, or overlapping point sets that confuse rather than clarify, gives SAM room to guess wrong regardless of how many sets you merge in.

      Whole pack won't import, or a downloaded checkpoint won't load. Pack-level. WAS Node Suite has been unmaintained since December 2023; reinstall requirements.txt against the correct, embedded Python interpreter if the suite throws "Import Failed." If SAM Model Loader specifically rejects a checkpoint, try Meta's original weights (sam_vit_h, sam_vit_l, or sam_vit_b) rather than one packaged for a newer, different SAM-based node pack - checkpoint conventions have drifted since WAS's SAM integration was last touched.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs