Nodes/comfyui-minimax-h3-audio-T8/MiniMax H3 RAFT Motion Audit / 光流运动审计 (Advanced)
ComfyUI Node

MiniMax H3 RAFT Motion Audit / 光流运动审计 (Advanced)

A read-only RAFT audit that tells you if your H3 shot actually moves

By T8mars·Created about a month ago·Updated a day ago· 1,031
MiniMax H3 RAFT Motion Audit / 光流运动审计 (Advanced)
  • frames
  • flow_preview
  • report_json
  • mean_motion_px
  • p95_motion_px
  • scene_cut_count
model_name
model_typeraft_small
precisionauto
analysis_max_side640
pair_batch_size1
consistency_checktrue
scene_cut_threshold0.20
release_policyoffload_after

Every H3 user eventually stares at a clip and asks the same three questions: did the video actually move, or is it a still with a camera hint? Where are the cuts? And is the motion collapsing into mush halfway through? You can squint at a preview, or you can run optical flow and get numbers. This node is the numbers - a read-only RAFT (Recurrent All-Pairs Field Transforms) motion audit that measures real per-frame motion and hands you mean_motion_px, p95_motion_px, and a scene_cut_count.

The "read-only" is the point. It doesn't repair faces, it doesn't sharpen frames, it doesn't modify H3 sampling. It runs RAFT over your decoded frames, computes optical flow, and reports. If you want to fix a problem it finds, that's other nodes' jobs - the mask propagation node in the same family, or the RealBasicVSR restore node. This one just tells the truth.

What it reports

  • mean_motion_px - average optical-flow magnitude across frames. Near-zero here is the "temporal collapse" red flag: your clip rendered but nothing happened.
  • p95_motion_px - the 95th percentile, so you can tell whether the motion is broadly alive or concentrated in a few spikes.
  • scene_cut_count - how many sudden cuts the flow detects, using the scene_cut_threshold (default 0.2). Lower the threshold and it flags more; raise it and only hard cuts count.
  • flow_preview - an image you can actually look at, because numbers lie less when you can see the vector field.
  • report_json - the full audit.

Inputs are your frames, the model_name (from ComfyUI/models/optical_flow - the pack's workflows default to raft_small_C_T_V2-01064c6d.pth), model_type (raft_small / raft_large - must match the weights' architecture), precision (auto/fp32/fp16), and analysis_max_side (default 640 - the frames get downscaled for analysis speed; 0 means full res). pair_batch_size is an advanced input for GPU memory; consistency_check enables the forward-backward consistency pass. release_policy default offload_after only unloads the RAFT weights, and the tooltip is specific: it never calls ComfyUI's global unload-all-models path, so you won't nuke your H3 model mid-workflow.

How to use it well

Run it on a clip before you invest in fixes. If mean motion is tiny, no amount of sharpening saves it - that's a sampling problem, go fix the schedule or the prompt. If scene_cut_count is high, your "one shot" is actually several, and downstream mask work (like the propagation node) will need per-shot anchors. And it's the honest A/B tool: run it on the same seed with and without your enhancement, and let mean_motion_px tell you whether the change actually moved anything.

The pack's own workflows put this audit at the front of the 07-motion-detail folder precisely because everything downstream benefits from knowing whether motion is real. One note: RAFT weights are a small download, and the node won't invent them - if model_name is empty, you haven't put a RAFT model in models/optical_flow yet.

Install

Same pack, same routine:

cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8.git minimax-h3-audio-T8

or ComfyUI Manager → "MiniMax H3 Audio T8" → restart. Update ComfyUI itself first (comfy_api.latest and native H3 support), and remember requirements.txt is intentionally empty. The RAFT model goes in ComfyUI/models/optical_flow/.

CategoryT8/MiniMax H3/Quality/Experimental/Optical Flow

Inputs (9)

NameTypeDefaultDescription
framesIMAGE
model_nameCOMBO0 options:
model_typeCOMBOraft_small2 options: raft_small, raft_large
precisionCOMBOauto3 options: auto, fp32, fp16
analysis_max_sideCOMBO6405 options: 384, 512, 640, 768, 0
pair_batch_sizeINT11–8
consistency_checkBOOLEANtrue
scene_cut_thresholdFLOAT0.200.01–1
release_policyCOMBOoffload_afteroffload_after removes only RAFT weights from GPU; it never calls the global ComfyUI unload-all-models path.

Outputs (5)

NameTypeDescription
flow_previewIMAGE
report_jsonSTRING
mean_motion_pxFLOAT
p95_motion_pxFLOAT
scene_cut_countINT