首页/ 节点库/ SAMDetector (segmented)
第三方插件 ComfyUI-Impact-Pack

SAMDetector (segmented)

使用 SAM (Segment Anything Model) 技术对输入的 SEGS 区域进行精确分割。SAMDetector (segmented)-

SAMDetector (segmented) 2026-01-28 收录 564 次浏览

节点中英文对比

ComfyUI 结构对照

按当前节点配置,分别展示中文与英文节点结构。面板按 ComfyUI 实际界面还原: 左侧圆点是输入,右侧圆点与该行最右的名称为输出,下方胶囊是控件参数; 控件两端的三角表示可切换的选项。

中文节点 11 项
SAMDetector (segmented)
sam_model combined_mask
segs batch_masks
image
detection_hint —
dilation —
threshold —
bbox_expansion —
mask_hint_threshold —
mask_hint_use_negative —
英文节点 11 项
SAMDetector (segmented)
sam_model combined_mask
segs batch_masks
image
detection_hint —
dilation —
threshold —
bbox_expansion —
mask_hint_threshold —
mask_hint_use_negative —
模型 条件 / 数值 Latent 其它类型 左圆点 = 输入,右圆点 = 输出 可切换选项 — 未设置默认值

面板用于对照参数位置与命名,不做交互;实际节点外观以 ComfyUI 内的主题为准。

参数说明

输入 3 · 输出 2 · 控件 6

依据当前节点关联的 NodesItems 数据,按输入、输出、控件三类分别列出名称与说明。

输入参数 3 项
sam_model sam_model
预加载的 Segment Anything 模型实例。
segs segs
区域分割信息,仅包含位置与框信息,不含图像。
image image
用于参考的原始图像。
输出参数 2 项
combined_mask combined_mask
所有 SAM 区域掩码融合而成的联合掩码图。
batch_masks batch_masks
每个区域单独输出的掩码集合,组成 batch。
控件参数 6 项
detection_hint detection_hint
指定 SAM 使用的提示类型: center - 1:一个中心点作提示,基础常用。 horizontal - 2:两个水平点确定提示区域。 vertical - 2:两个垂直点确定提示区域。 rect - 4:四个点定义矩形作提示。 diamond - 4:四个点构成菱形作提示。 mask - area:用区域作提示分割目标。 mask - points:多个点辅助分割。 mask - point - bbox:点和边界框结合提示。 none:不使用提示 。
dilation dilation
对 SAM 输出 mask 进行形态学膨胀(正)或腐蚀(负)处理。
threshold threshold
SAM 模型输出的 mask 置信度阈值。值越大掩码越精细(目标范围更小)。推荐范围 0.85~0.95。
bbox_expansion bbox_expansion
SAM 在处理每个 bbox 时的额外边界扩展像素数。
mask_hint_threshold mask_hint_threshold
当使用掩码作为提示时,用于控制提示掩码强度的阈值。影响提示点从原掩码中提取方式;建议保持默认值 0.7。
mask_hint_use_negative mask_hint_use_negative
是否使用负提示信息: False, Small, Outter。 Small 排除较小区域;Outter 排除区域外侧背景;提高多目标区分度。

节点详解

原理 · 用法 · 常见问题
暂无节点说明

常见问题

按节点参数整理
SAMDetector (segmented)是做什么的?
使用 SAM (Segment Anything Model) 技术对输入的 SEGS 区域进行精确分割。SAMDetector (segmented)-
SAMDetector (segmented)有哪些输入参数?
共 3 个输入,包括 sam_model(sam_model)、segs(segs)、image(image)。
SAMDetector (segmented)的输出是什么?
共 2 个输出:combined_mask(combined_mask)、batch_masks(batch_masks)。
SAMDetector (segmented)有哪些可调参数?
共 6 个控件参数,包括 detection_hint(detection_hint)、dilation(dilation)、threshold(threshold)、bbox_expansion(bbox_expansion)、mask_hint_threshold(mask_hint_threshold)、mask_hint_use_negative(mask_hint_use_negative)。
SAMDetector (segmented)属于哪个节点包?
属于「ComfyUI-Impact-Pack」,节点分类为「第三方插件」。

同类节点

ComfyUI-Impact-Pack