MiniMax H3 SAM3.1 Multi-Person Track / 多人分色追踪 (Advanced)
Track two or three people through a shot with SAM3.1 — colors are not identity
- frames
- model
- conditioning
- track_plan
- colored_preview
- report_json
- shot_count
- shot_local_track_count
Multi-person H3 repair has a chicken-and-egg problem: to fix a specific person's face across a shot you need to know where that person is in every frame, and to track them you need segmentation. This node is the tracking half, built on ComfyUI's native SAM3.1 multiplex support. It runs SAM3.1 per detected shot, caps the result at 2–3 people, and emits color-coded, shot-local track IDs you can feed into the pack's multi-person face refine / skin finish chain.
If you've used SAM3's promptable concept segmentation, the mechanics will feel familiar: you give it a model (load sam3.1_multiplex_fp16.safetensors) and conditioning (normally the single word person), and it returns masks for every matching instance. This node layers shot detection on top so tracking doesn't wander across a cut, and it's opinionated about scale - maximum_people only goes 2–3, because the author reviewed this for two-to-three-person scenes, not crowds.
Inputs that matter
frames(IMAGE),model,conditioning- the SAM3.1 trio.fps(24),detection_threshold(0.5),detect_interval(3) - how often and how confidently SAM re-detects.scene_cut_threshold(0.28) - shot boundary detection; above the threshold, tracking resets to a new shot-local ID.analysis_max_side(640) - the tooltip is worth quoting: 0 keeps source size, but "SAM3.1 still uses its fixed 1008-square backbone; this mainly bounds input/preview tensors rather than backbone VRAM." So don't expect this to save you from the backbone's memory cost.preview_stride(8) - how often a colored preview frame is emitted.release_policy-offload_sam31_after_trackdefault: selectively unloads the SAM model and its clones before H3 repair, so a 2GB segmentation model isn't still resident when you start sampling.
Outputs: track_plan (typed handle for the face-refine/skin nodes), colored_preview (IMAGE), report_json, shot_count, and shot_local_track_count.
The caveat that matters
The description states it plainly: colors are not character identity. A red track in shot 1 and a red track in shot 2 are both just "first detected person in their own shot" - nothing connects them across shots, and nothing claims person A is the same character as person A elsewhere. If your scene is one continuous shot of the same two people, you're fine. If it's multiple shots of the same two people, the per-shot IDs won't match up for you; that's a known limitation, not a bug to report.
Installing
In the T8mars MiniMax H3 Audio T8 pack (Manager → "MiniMax H3 Audio T8" or git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8 into custom_nodes), restart, no pip deps. You do need the SAM3.1 multiplex model file and its CLIP text conditioning on hand, plus a ComfyUI build new enough to expose native SAM3.1.
The take
This is the boring-but-necessary upstream of decent multi-person repair: without a per-shot track plan, the downstream skin/face nodes have nothing to hang per-person masks on. Expect the preview to look like a blobby color-coded video - that's the deliverable. If you're doing single-person repair, use the pack's single-person face-refine path instead; this node exists specifically because single-face tracking doesn't cut it when two people swap positions mid-scene.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| frames | IMAGE | — | |
| model | MODEL | Load sam3.1_multiplex_fp16.safetensors. | |
| conditioning | CONDITIONING | SAM3.1 CLIP text conditioning, normally: person | |
| fps | FLOAT | 24.000.01–240 | — |
| maximum_people | INT | 32–3 | — |
| detection_threshold | FLOAT | 0.500–1 | — |
| detect_interval | INT | 31–24 | — |
| scene_cut_threshold | FLOAT | 0.280.01–1 | — |
| analysis_max_side | COMBO | 640 | 0 keeps source size. SAM3.1 still uses its fixed 1008-square backbone; this mainly bounds input/preview tensors rather than backbone VRAM. |
| preview_stride | INT | 81–120 | — |
| release_policy | COMBO | offload_sam31_after_track | 2 options: offload_sam31_after_track, keep_loaded |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| track_plan | H3_T8_SAM31_MULTIFACE_TRACK_PLAN | — |
| colored_preview | IMAGE | — |
| report_json | STRING | — |
| shot_count | INT | — |
| shot_local_track_count | INT | — |