vault backup: 2026-04-24 10:37:55
This commit is contained in:
@@ -68,85 +68,176 @@ tags:
|
||||
|
||||
---
|
||||
|
||||
## 第四步:创建交互式提示(三选一或组合)
|
||||
## 第四步:SAM2 节点功能总览与选型
|
||||
|
||||
根据你的需求,添加以下**至少一种**提示节点。建议**三种都创建**,后期灵活切换。
|
||||
`comfyui-segment-anything-2` 提供了 6 个核心节点。以下是它们的功能定位:
|
||||
|
||||
### 4.1 点标注(正选/反选)
|
||||
### 4.1 核心加载类
|
||||
|
||||
1. 添加节点:`SAM2 → `SAM2 Point Prompt` 或 `Point Prompt`
|
||||
2. 参数设置:
|
||||
- `points`: `[[0.5, 0.5]]`(归一化坐标,格式为 JSON 列表)
|
||||
- `labels`: `[1]`(`1` = 正选前景,`0` = 反选背景)
|
||||
- **示例**:`points = [[0.45, 0.52], [0.55, 0.48]]`, `labels = [1, 0]` 表示第一个点是前景、第二个点是背景排除
|
||||
**`(Down)Load SAM2Model`**
|
||||
- **功能**:从本地加载或从服务器下载指定的 SAM2 模型文件
|
||||
- **关键参数**:
|
||||
- `model`: 如 `sam2.1_hiera_base_plus.safetensors`
|
||||
- `segmentor`: 可选择单图或视频模式
|
||||
- `device`: `cuda` 或 `cpu`
|
||||
- `precision`: `fp16`(推荐)、`bf16`、`fp32`
|
||||
|
||||
> **注意**:SAM2 的坐标通常是**归一化坐标**(0~1),而非像素坐标。部分节点包也支持像素坐标,请查看节点说明。
|
||||
### 4.2 静态图像分割类
|
||||
|
||||
### 4.2 框标注
|
||||
**`Sam2Segmentation`**
|
||||
- **功能**:标准单帧分割器。根据输入的正向/负向点坐标、检测框或初始遮罩生成分割结果
|
||||
- **关键输入**:`coordinates_positive`(正选点)、`coordinates_negative`(反选点)、`bboxes`
|
||||
|
||||
1. 添加节点:`SAM2` → `SAM2 Box Prompt` 或 `Box Prompt`
|
||||
2. 参数:
|
||||
- `box`: `[0.3, 0.3, 0.7, 0.8]`(xyxy 格式,归一化坐标)
|
||||
**`Sam2AutoSegmentation`**
|
||||
- **功能**:"分割一切"模式。无需手动点击,通过全图布设点阵(`points_per_side`)自动识别所有可能的物体
|
||||
- **适用**:全自动抠出图中所有物体
|
||||
|
||||
### 4.3 语义提示(文本 → 检测框 → Mask)
|
||||
### 4.3 视频追踪与交互类
|
||||
|
||||
这是**自动化程度最高**的路径,需要两步:
|
||||
**`Sam2VideoSegmentationAddPoints`**
|
||||
- **功能**:视频工作流的"交互站"。允许你在特定帧(`frame_index`)添加点标注,并将标注注入到视频推理状态(`inference_state`)中
|
||||
- **关键作用**:
|
||||
- 初始化视频追踪状态
|
||||
- 通过 `prev_inference_state` 链式追加多帧标注(实现人工纠正)
|
||||
- **关键输入**:`image`(视频批次或关键帧)、`coordinates_positive`、`coordinates_negative`、`frame_index`
|
||||
|
||||
#### Step A:文本转检测框
|
||||
1. 添加节点:`Impact` → `GroundingDinoDetector` 或 `UltralyticsDetectorProvider`
|
||||
- 选择 `Grounding DINO` 节点
|
||||
2. 参数:
|
||||
- `prompt`: `"a person"`(你的目标描述)
|
||||
- `threshold`: `0.3`(置信度阈值)
|
||||
**`Sam2VideoSegmentation`**
|
||||
- **功能**:视频推理的核心引擎。接收模型和带有标注信息的 `inference_state`,执行跨帧自动追踪
|
||||
- **输出**:`mask`(完整视频的分割结果批次)
|
||||
|
||||
#### Step B:检测框转 SAM2 框提示
|
||||
1. `Grounding DINO` 的 `BOXES` 输出 → 连接到 `Box Prompt` 节点的 `box` 输入
|
||||
2. 这样文本自动生成了空间位置信息
|
||||
### 4.4 辅助与坐标转换类
|
||||
|
||||
**`Florence2 Coordinates`**
|
||||
- **功能**:桥接节点。将 Florence-2 视觉模型输出的检测数据转换为 SAM2 可识别的坐标格式(中心点 `center_coordinates` 或检测框 `boxes`)
|
||||
- **用途**:实现"文字搜图并抠图"的全自动流程
|
||||
|
||||
### 4.5 快速选型建议
|
||||
|
||||
| 任务场景 | 核心节点组合 |
|
||||
|:---|:---|
|
||||
| **全自动抠出图中所有物体** | `(Down)Load SAM2Model` + `Sam2AutoSegmentation` |
|
||||
| **手动点击抠出视频第一帧** | `(Down)Load SAM2Model` + `Sam2Segmentation` |
|
||||
| **将第一帧的效果推广到全视频** | `Sam2VideoSegmentationAddPoints` + `Sam2VideoSegmentation` |
|
||||
| **全自动语义分割(如:抠出手柄)** | `Florence-2` 相关节点 + `Florence2 Coordinates` + `Sam2Segmentation` |
|
||||
|
||||
---
|
||||
|
||||
## 第五步:单帧分割(SAM2 Image Predictor)
|
||||
## 第五步:单帧分割测试(确认第一帧标注)
|
||||
|
||||
1. 添加节点:`SAM2` → `SAM2 Image Predictor`
|
||||
2. 连线如下:
|
||||
- `SelectFrames` 的图像输出 → `SAM2 Image Predictor` 的 `image`
|
||||
- `SAM2 Model Loader` 的模型输出 → `SAM2 Image Predictor` 的 `sam2_model`
|
||||
- `Point Prompt` / `Box Prompt` 的提示输出 → `SAM2 Image Predictor` 的 `prompt`
|
||||
在接入视频追踪前,建议先用单帧节点快速验证标注位置是否准确。
|
||||
|
||||
### 5.1 手动点/框标注(Sam2Segmentation)
|
||||
|
||||
1. 添加节点:`SAM2` → `Sam2Segmentation`
|
||||
2. 连线:
|
||||
- `Select Images`(第一帧)的图像输出 → `Sam2Segmentation` 的 `image`
|
||||
- `(Down)Load SAM2Model` 的模型输出 → `Sam2Segmentation` 的 `sam2_model`
|
||||
- `coordinates_positive`: 填入你的正选点坐标(如 `[[0.45, 0.52]]`)
|
||||
- `coordinates_negative`: 填入反选点坐标(如 `[[0.55, 0.48]]`),如无则留空
|
||||
- `bboxes`: 如使用检测框则填入,否则留空
|
||||
3. 参数:
|
||||
- `multimask_output`: `False`(一般场景单 mask 即可,复杂场景可开 True 再筛选)
|
||||
- `keep_model_loaded`: 可开启(若后续继续用同一模型)
|
||||
- `individual_objects`: 根据需求选择(多目标时开启)
|
||||
4. 输出连到 `image` → `Preview Image` 查看效果
|
||||
|
||||
> **坐标格式提示**:请查看该节点说明,确认使用的是**归一化坐标**(0~1)还是**像素坐标**。
|
||||
|
||||
### 5.2 自动分割一切(Sam2AutoSegmentation)
|
||||
|
||||
如果你不想手动标注,可以使用全自动模式:
|
||||
1. 添加节点:`SAM2` → `Sam2AutoSegmentation`
|
||||
2. 连线:`Select Images` → `image`,`(Down)Load SAM2Model` → `sam2_model`
|
||||
3. 参数调整(可选):
|
||||
- `points_per_side`: 网格密度(默认 32,越大越精细但越慢)
|
||||
- `pred_iou_thresh`: IOU 阈值过滤低质量 mask
|
||||
4. 输出:`mask`、`segmented_image`、`bbox`
|
||||
|
||||
**此时你可以先点击「运行」测试单帧分割效果。**
|
||||
|
||||
---
|
||||
|
||||
## 第六步:视频追踪核心(SAM2 Video Predictor)
|
||||
## 第六步:视频追踪核心链路
|
||||
|
||||
这是将单帧结果传播到全视频的关键节点。
|
||||
`comfyui-segment-anything-2` 的视频追踪由两个节点配合完成:`Sam2VideoSegmentationAddPoints`(注入提示)+ `Sam2VideoSegmentation`(执行追踪)。
|
||||
|
||||
1. 添加节点:`SAM2` → `SAM2 Video Predictor` 或 `SAM2VideoPredictor`
|
||||
### 6.1 Sam2VideoSegmentationAddPoints(视频交互注入)
|
||||
|
||||
1. 添加节点:`SAM2` → `Sam2VideoSegmentationAddPoints`
|
||||
2. 连线:
|
||||
- `SAM2 Model Loader` → `sam2_model`
|
||||
- `Load Video` 的完整图像批次 → `video_frames`(或 `images`)
|
||||
- `SAM2 Image Predictor` 输出的 `mask` → `initial_mask`
|
||||
- `SelectFrames` 的帧索引(或通过常量节点设置 `frame_index=0`)→ `frame_index`
|
||||
3. **内部逻辑**:该节点会对视频所有帧预编码,并在第 0 帧注入你刚才分割的 mask
|
||||
- `(Down)Load SAM2Model` → `sam2_model`
|
||||
- `Load Video` 的完整图像批次 → `image`(视频源)
|
||||
- `coordinates_positive`: 填入第一帧的正选点坐标
|
||||
- `coordinates_negative`: 填入反选点坐标(可选)
|
||||
3. 参数:
|
||||
- `frame_index`: `0`(表示在第 0 帧添加这些点标注)
|
||||
- `object_index`: `0`(单目标保持默认,多目标时递增)
|
||||
- `prev_inference_state`: **首次追踪时留空**;链式追加关键帧时接入上一步的 `inference_state`
|
||||
4. 输出:`inference_state`(携带了视频帧信息和标注状态)
|
||||
|
||||
### 6.2 Sam2VideoSegmentation(视频推理引擎)
|
||||
|
||||
1. 添加节点:`SAM2` → `Sam2VideoSegmentation`
|
||||
2. 连线:
|
||||
- `(Down)Load SAM2Model` → `sam2_model`
|
||||
- `Sam2VideoSegmentationAddPoints` 的 `inference_state` → `inference_state`
|
||||
3. 参数:
|
||||
- `keep_model_loaded`: 推荐开启(避免重复加载模型)
|
||||
4. 输出:`mask`(完整视频的分割结果,批次形式)
|
||||
|
||||
### 6.3 标准视频工作流连线示意
|
||||
|
||||
```
|
||||
[Load Video] ───────────────────────┐
|
||||
│ │
|
||||
↓ ↓
|
||||
[Sam2VideoSegmentationAddPoints] ──→ [Sam2VideoSegmentation] ──→ [Preview / Save]
|
||||
↑ ↑
|
||||
[(Down)Load SAM2Model] [(Down)Load SAM2Model]
|
||||
↑
|
||||
[coordinates_positive / coordinates_negative]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 第七步:双向追踪(Track Range)
|
||||
## 第七步:人工纠正与多关键帧(Fast Muter 应用)
|
||||
|
||||
部分 SAM2 节点包将追踪拆分为独立节点,部分内嵌在 Video Predictor 中。
|
||||
`Sam2VideoSegmentationAddPoints` 的 `prev_inference_state` 输入天然支持**链式追加**多帧标注。这是实现"第一帧标注 + 中途修正"的核心机制。
|
||||
|
||||
### 情况 A:有独立追踪节点
|
||||
1. 添加节点:`SAM2` → `SAM2 Track Forward` 和 `SAM2 Track Backward`
|
||||
2. 或者查找:`SAM2` → `Track Range` / `Track Bidirectional`
|
||||
3. 连线:`SAM2 Video Predictor` 的 `state` 输出 → `Track Range` 的 `video_state`
|
||||
4. 参数:
|
||||
- `start_frame`: 关键帧索引(如 0)
|
||||
- `direction`: `both` 或分别创建前向/后向节点
|
||||
### 7.1 多关键帧链式结构(无修正时的标准链路)
|
||||
|
||||
### 情况 B:追踪内嵌在 Video Predictor 中
|
||||
- 若你的节点包版本直接输出 `mask_sequence`,则跳过此步,直接连到预览/保存节点。
|
||||
如果你只想用第一帧推广到全视频,链路如下:
|
||||
|
||||
```
|
||||
[Sam2VideoSegmentationAddPoints(第0帧标注)]
|
||||
↓ inference_state
|
||||
[Sam2VideoSegmentation]
|
||||
↓ mask
|
||||
[Preview / Save]
|
||||
```
|
||||
|
||||
### 7.2 中途人工纠正链路
|
||||
|
||||
当视频较长、目标发生遮挡/形变导致追踪漂移时,可在中间帧追加标注:
|
||||
|
||||
```
|
||||
[Sam2VideoSegmentationAddPoints(第0帧)]
|
||||
↓ inference_state
|
||||
[Sam2VideoSegmentationAddPoints(第45帧修正, prev_inference_state接入)]
|
||||
↓ inference_state
|
||||
[Sam2VideoSegmentation]
|
||||
↓ mask
|
||||
[Preview / Save]
|
||||
```
|
||||
|
||||
**操作方式**:
|
||||
1. 第一个 `AddPoints` 节点保持第一帧的标注不变
|
||||
2. 新建第二个 `AddPoints` 节点:
|
||||
- `image`: 接入 `Load Video` 的完整批次(与第一个相同)
|
||||
- `prev_inference_state`: 接入第一个 `AddPoints` 的 `inference_state`
|
||||
- `frame_index`: 修正帧号(如 `45`)
|
||||
- `coordinates_positive`: 修正后的点坐标
|
||||
3. 第二个 `AddPoints` 的 `inference_state` → `Sam2VideoSegmentation`
|
||||
4. 重新运行,系统会以第 0 帧和第 45 帧为锚点,综合追踪整个视频
|
||||
|
||||
---
|
||||
|
||||
@@ -174,61 +265,54 @@ tags:
|
||||
|
||||
---
|
||||
|
||||
## 第九步:人工纠正分支(RGThree Fast Muter)
|
||||
## 第九步:用 Fast Muter 优化纠正 Workflow
|
||||
|
||||
这是提升迭代效率的核心技巧。
|
||||
在 `comfyui-segment-anything-2` 中,纠正本质上是通过 `prev_inference_state` 链式追加 `Sam2VideoSegmentationAddPoints`。`Fast Muter` 的作用是让你**提前建好纠正节点但默认不执行**,避免每次运行都走一遍修正链路。
|
||||
|
||||
### 9.1 创建 Fast Muter 节点
|
||||
|
||||
1. 右键/双击空白处
|
||||
2. 找到:`rgthree` → `Fast Muter`(或 `Fast Bypasser`)
|
||||
2. 找到:`rgthree` → `Fast Muter`(或 `Fast Muter/Bypasser`)
|
||||
3. 该节点有一个开关按钮,点击可在 **启用(绿色)** 和 **跳过/静音(红色)** 之间切换
|
||||
|
||||
### 9.2 搭建纠正分支
|
||||
### 9.2 搭建纠正分支(推荐方案)
|
||||
|
||||
**思路**:在主线旁创建一条「修正输入」的旁路,默认关闭(Bypass)。发现问题时打开,覆盖原追踪结果。
|
||||
**核心思路**:将修正用的 `Sam2VideoSegmentationAddPoints` 节点插入到主链路的 `prev_inference_state` 路径上,默认通过 **Fast Muter / Bypass** 跳过它。
|
||||
|
||||
#### 具体步骤:
|
||||
|
||||
1. **创建修正用的 Frame Picker**:
|
||||
- 再添加一个 `SelectFrames` 节点,命名为 "Fix_Frame"
|
||||
- 参数 `frame_index`:留空或设为 `45`(示例问题帧)
|
||||
1. **主链路保持不变**:
|
||||
- `Sam2VideoSegmentationAddPoints(第0帧)` → `Sam2VideoSegmentation`
|
||||
|
||||
2. **创建修正用的 Point Prompt**:
|
||||
- 再添加一个 `Point Prompt`,命名为 "Fix_Points"
|
||||
- 填入修正后的坐标
|
||||
2. **插入修正节点**:
|
||||
- 新建第二个 `Sam2VideoSegmentationAddPoints`,命名为 "Fix_AddPoints"
|
||||
- `prev_inference_state`:接入主链路第一个 AddPoints 的 `inference_state`
|
||||
- `image`: 接入 `Load Video` 的完整批次(与主链路相同)
|
||||
- `frame_index`: `45`(示例问题帧)
|
||||
- `coordinates_positive`: 填入修正后的点坐标
|
||||
- 该节点的 `inference_state` → `Sam2VideoSegmentation`
|
||||
|
||||
3. **创建修正用的 SAM2 Image Predictor**:
|
||||
- 添加第二个 `SAM2 Image Predictor`,命名为 "SAM2_Fix"
|
||||
- 输入:`Fix_Frame` 的图像 + `Fix_Points` + 公共 `SAM2 Model Loader`
|
||||
|
||||
4. **插入 Fast Muter 控制修正流**:
|
||||
- 在 "SAM2_Fix" 的 `mask` 输出后,连接到一个 `Fast Muter` 节点
|
||||
- `Fast Muter` 的输出 → `SAM2 Video Predictor` 的 `correction_mask` 或 `additional_hint` 输入
|
||||
- **默认状态**:点击 `Fast Muter` 使其变为红色(Muted/跳过),此时修正分支不参与运算
|
||||
- **需要修正时**:点击变绿(启用),修正 mask 被注入追踪器
|
||||
|
||||
5. **创建重新追踪控制**:
|
||||
- 如果 SAM2 Video Predictor 支持 `retrack_from_frame` 输入,将 `Fix_Frame` 的帧索引连入
|
||||
- 或使用第二个 `Track Range` 节点,设置 `start_frame` 为修正帧
|
||||
3. **使用 Fast Muter 控制**:
|
||||
- **方案 A(Mute 节点输入)**:在 "Fix_AddPoints" 的 `coordinates_positive` 输入前放置 `Fast Muter`,默认红色(阻断)。需要纠正时变绿,坐标流入,修正生效。
|
||||
- **方案 B(原生 Bypass)**:直接对 "Fix_AddPoints" 节点右键 → `Bypass`。被 Bypass 时,ComfyUI 会跳过该节点,数据直接从上游流到下游(相当于无修正)。需要纠正时取消 Bypass。
|
||||
|
||||
### 9.3 实际操作流程
|
||||
|
||||
```
|
||||
第一次运行:
|
||||
1. Fast Muter = 红色(关闭)
|
||||
2. 运行完整工作流
|
||||
1. Fix_AddPoints 被 Bypass / Fast Muter 关闭
|
||||
2. 运行完整工作流(仅第 0 帧标注)
|
||||
3. 检查 Preview Image / 输出视频
|
||||
|
||||
发现问题(如第 45 帧漂移):
|
||||
1. 修改 "Fix_Frame" 的 frame_index = 45
|
||||
2. 修改 "Fix_Points" 的坐标为正确位置
|
||||
3. 点击 Fast Muter → 绿色(启用)
|
||||
1. 修改 "Fix_AddPoints" 的 frame_index = 45
|
||||
2. 修改 "Fix_AddPoints" 的 coordinates_positive 为正确坐标
|
||||
3. 取消 Bypass / Fast Muter 变绿(启用)
|
||||
4. 重新点击「运行」
|
||||
5. 系统从第 45 帧重新追踪,覆盖错误区间
|
||||
5. 系统以第 0 帧 + 第 45 帧为锚点,综合追踪整个视频
|
||||
|
||||
确认修复后:
|
||||
1. Fast Muter → 红色(关闭,避免影响后续运行)
|
||||
1. 恢复 Bypass / Fast Muter 关闭
|
||||
2. 保存最终工作流
|
||||
```
|
||||
|
||||
@@ -239,19 +323,30 @@ tags:
|
||||
按以下逻辑检查你的连线是否完整:
|
||||
|
||||
```
|
||||
[Load Video] ──→ [SelectFrames(0)] ──→ [SAM2 Image Predictor] ←── [SAM2 Model Loader]
|
||||
│ ↑
|
||||
│ [Point Prompt / Box Prompt / Text→Grounding→Box]
|
||||
│ │
|
||||
│ [Fast Muter] ←── [SelectFrames(N)] ──→ [SAM2 Image Predictor(修正)]
|
||||
│ (默认关闭) ↑
|
||||
│ [Fix Points]
|
||||
↓
|
||||
[SAM2 Video Predictor] ←── initial_mask ───┘
|
||||
[Load Video] ───────────────────────┬───────────────────────────────────────────┐
|
||||
│ │ │
|
||||
↓ ↓ │
|
||||
[Select Images] [Sam2VideoSegmentationAddPoints] │
|
||||
│ (index=0) ↑ │
|
||||
│ [(Down)Load SAM2Model] │
|
||||
│ ↑ │
|
||||
│ [coordinates_positive] │
|
||||
↓ │ │
|
||||
[Sam2Segmentation] ←───────────────┘ (可选:单帧预览测试) │
|
||||
│ │
|
||||
↓ ↓
|
||||
[Preview Image] [Sam2VideoSegmentation]
|
||||
│
|
||||
┌─────────────────────────────────────────────────────────────────────────┘
|
||||
│
|
||||
├──→ [Track Forward] ──┐
|
||||
└──→ [Track Backward] ─┼──→ [合并 Mask Sequence] ──→ [MaskToImage] ──→ [Preview Image]
|
||||
└────────────────────────────────────────────────→ [Save Image]
|
||||
├──→ [MaskToImage] ──→ [Preview Image]
|
||||
└──→ [Save Image] / [VHS_VideoCombine]
|
||||
|
||||
纠正分支(可选,默认关闭):
|
||||
[Sam2VideoSegmentationAddPoints(第0帧)] ──→ [Fix_AddPoints(第N帧)] ──→ [Sam2VideoSegmentation]
|
||||
↑
|
||||
[coordinates_positive(修正坐标)]
|
||||
[Fast Muter / Bypass (控制开关)]
|
||||
```
|
||||
|
||||
---
|
||||
@@ -259,12 +354,13 @@ tags:
|
||||
## 运行前检查清单
|
||||
|
||||
- [ ] SAM2 模型文件已下载到 `ComfyUI/models/sam2/` 目录
|
||||
- [ ] Grounding DINO 模型已下载(如使用语义提示)
|
||||
- [ ] Florence-2 / Grounding DINO 模型已下载(如使用语义提示)
|
||||
- [ ] `Load Video` 已选择有效视频路径
|
||||
- [ ] `SelectFrames(0)` 正确提取了第一帧
|
||||
- [ ] Prompt 节点的坐标格式与节点要求一致(归一化 0~1 或像素坐标)
|
||||
- [ ] `SAM2 Video Predictor` 接收的是**完整视频批次**,而非单帧
|
||||
- [ ] `Fast Muter` 当前状态符合预期(首次运行应为关闭/红色)
|
||||
- [ ] `Select Images` 的 `index=0` 正确提取了第一帧
|
||||
- [ ] `coordinates_positive` 的坐标格式与节点要求一致(归一化 0~1 或像素坐标)
|
||||
- [ ] `Sam2VideoSegmentationAddPoints` 的 `image` 接入的是**完整视频批次**,而非单帧
|
||||
- [ ] `Sam2VideoSegmentationAddPoints` 的 `frame_index` 指向了正确的标注帧
|
||||
- [ ] `Fast Muter` / 修正节点 Bypass 状态符合预期(首次运行应为关闭)
|
||||
- [ ] 输出节点的保存路径可写
|
||||
|
||||
---
|
||||
@@ -274,17 +370,17 @@ tags:
|
||||
| 问题 | 排查方向 |
|
||||
|------|---------|
|
||||
| 节点呈红色/无法创建 | 节点包未安装或加载失败,检查 ComfyUI 启动日志 |
|
||||
| SAM2 节点报错显存不足 | 换 `sam2_hiera_tiny.pt`,或降低视频分辨率,或启用 fp16 |
|
||||
| 追踪结果全黑/全白 | 检查 `initial_mask` 是否正确传入;检查坐标格式(0~1 vs 像素) |
|
||||
| Grounding DINO 无检测结果 | 降低 `threshold`,或简化 prompt(如只写 `"person"`) |
|
||||
| 修正后重新追踪无变化 | 确认 `Fast Muter` 已启用(绿色),且修正 mask 正确连入 Video Predictor |
|
||||
| SAM2 节点报错显存不足 | 换 `sam2.1_hiera_tiny.safetensors`,或降低视频分辨率,或启用 fp16 |
|
||||
| 追踪结果全黑/全白 | 检查 `coordinates_positive` 是否正确传入;检查坐标格式(0~1 vs 像素);确认 `frame_index` 与标注帧一致 |
|
||||
| Florence-2 / Grounding DINO 无检测结果 | 降低 `threshold`,或简化 prompt(如只写 `"person"`) |
|
||||
| 修正后重新追踪无变化 | 确认修正节点已取消 Bypass / Fast Muter 已启用;确认修正节点的 `prev_inference_state` 正确接入上游 |
|
||||
| 视频输出帧率不对 | 在 `Load Video` 和 `VideoCombine` 中统一设置 fps 参数 |
|
||||
|
||||
---
|
||||
|
||||
## 下一步建议
|
||||
|
||||
1. **先跑通单帧分割**:不连 Video Predictor,只用 Image Predictor + Preview Image 确认第一帧分割正确
|
||||
2. **再接入视频追踪**:确认单帧无误后,再连 SAM2 Video Predictor
|
||||
1. **先跑通单帧分割**:不连视频追踪链路,只用 `Sam2Segmentation` + `Preview Image` 确认第一帧分割正确
|
||||
2. **再接入视频追踪**:确认单帧无误后,再连 `Sam2VideoSegmentationAddPoints` + `Sam2VideoSegmentation`
|
||||
3. **最后添加纠正分支**:等标准流程跑通后再加入 RGThree Fast Muter 机制
|
||||
4. **保存工作流模板**:`Workflow` → `Save`(或 Ctrl+S),命名为 `VideoSeg_Template.json`
|
||||
|
||||
Reference in New Issue
Block a user