Revise README for temporal mask tools clarity

Updated README to clarify functionality and improve sample video presentation.
This commit is contained in:
nomadoor
2025-10-18 00:11:37 +09:00
committed by GitHub
parent f3ebc5f8bd
commit 415c0fa4e6
+2 -9
View File
@@ -1,12 +1,12 @@
# ComfyUI Temporal Mask Tools
Utility collection of ComfyUI V3 nodes for stabilizing temporal segmentation masks while staying deterministic and torch-only.
Temporal-mask cleaning tools for ComfyUI: union noisy frames to smooth flicker, then drop one-off specks so your mask sequences stay stable.
## Sample Videos
| Original Video | Detection (Florence-2) |
| --- | --- |
| --- | ![mask_sample](https://github.com/user-attachments/assets/9199ba8c-2ee2-4e41-a62e-f2d8a59c5420) |
| ![sample_video3](https://github.com/user-attachments/assets/f3ac8f18-947b-4542-8779-6a23586a54d0) | ![mask_sample](https://github.com/user-attachments/assets/9199ba8c-2ee2-4e41-a62e-f2d8a59c5420) |
| After Union | After Remove Short Objects |
| --- | --- |
@@ -25,7 +25,6 @@ Combines nearby frames in a temporal mask sequence to suppress flicker.
| `mode` | STRING | `"or"` | `"or"` keeps any active frame, `"majority"` uses the threshold. |
| `threshold` | INT | 3 | Minimum active frames within the window when `mode="majority"`. |
**Output**: `mask_batch_out` - mask tensor with original shape restored.
### Temporal Mask Remove Short Objects (`TemporalMaskRemoveShortObjects`)
Drops one-frame flicker or tiny specks by combining per-frame connected-component filtering with temporal run-length pruning.
@@ -36,15 +35,9 @@ Drops one-frame flicker or tiny specks by combining per-frame connected-componen
| `min_duration` | INT | 2 | Minimum consecutive frames required to keep a pixel active. |
| `min_area_pixels` | INT | 10 | Connected components smaller than this pixel count are removed. |
**Output**: `mask_batch_out` - mask tensor with transient or tiny activations removed.
## Usage
1. Clone into `ComfyUI/custom_nodes` and restart ComfyUI.
2. Drop the desired node into your graph and connect it to a mask sequence batch.
3. Optional: enable node-level `debug_output` (when available) while tuning parameters.