Nodes/MiniMax H3 Audio T8/MiniMax H3 SAM3.1 Multi-Person Track / 多人分色追踪 (Advanced)
ComfyUI Node

MiniMax H3 SAM3.1 Multi-Person Track / 多人分色追踪 (Advanced)

Track two or three people through a shot with SAM3.1 — colors are not identity

By T8mars·Created 20 days ago·Updated a day ago· 807
MiniMax H3 SAM3.1 Multi-Person Track / 多人分色追踪 (Advanced)
  • frames
  • model
  • conditioning
  • track_plan
  • colored_preview
  • report_json
  • shot_count
  • shot_local_track_count
fps24.00
maximum_people3
detection_threshold0.50
detect_interval3
scene_cut_threshold0.28
analysis_max_side640
preview_stride8
release_policyoffload_sam31_after_track

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_track default: 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.

CategoryT8/MiniMax H3/Quality/Experimental/Face Refine Multi-Person

Inputs (11)

NameTypeDefaultDescription
framesIMAGE
modelMODELLoad sam3.1_multiplex_fp16.safetensors.
conditioningCONDITIONINGSAM3.1 CLIP text conditioning, normally: person
fpsFLOAT24.000.01–240
maximum_peopleINT32–3
detection_thresholdFLOAT0.500–1
detect_intervalINT31–24
scene_cut_thresholdFLOAT0.280.01–1
analysis_max_sideCOMBO6400 keeps source size. SAM3.1 still uses its fixed 1008-square backbone; this mainly bounds input/preview tensors rather than backbone VRAM.
preview_strideINT81–120
release_policyCOMBOoffload_sam31_after_track2 options: offload_sam31_after_track, keep_loaded

Outputs (5)

NameTypeDescription
track_planH3_T8_SAM31_MULTIFACE_TRACK_PLAN
colored_previewIMAGE
report_jsonSTRING
shot_countINT
shot_local_track_countINT