Nodes/IAMCCS-nodes/MiniMax H3 Exact Delivery Duration (R21)
ComfyUI Node

MiniMax H3 Exact Delivery Duration (R21)

Fixing the frame count drift after an 8n+1 LTX round trip

By IAMCCS·Created 11 months ago·Updated 5 days ago· 113
MiniMax H3 Exact Delivery Duration (R21)
  • delivery_frames
  • audio
  • native_reference_frames
  • delivery_frames
  • audio
  • report
delivery_fps
native_fps24

Here's a video-workflow annoyance that only shows up at the end: H3 renders a segment at exactly 124 frames, you send it through an LTX upscale round trip, and the LTX VAE's temporal tiling spits back a slightly different count - 8n+1 frame math and chunk boundaries have a way of adding or eating a few frames. The final cut is now a third of a second off, audio drifts, and your editor hates you. The Exact Delivery Duration node is the reconciliation step: it trims or pads the delivered video back to the exact native duration and re-fits the audio to match.

How it works

It compares the delivery frames against the native reference frames you feed it. Given both, plus delivery_fps and the native fps (default 24), it computes the target count: round(native_count * delivery_fps / native_fps). Then:

  • If the delivery has too many frames, it crops the tail (crop_tail).
  • If it has too few, it holds the last frame to pad out the difference (hold_last_frame).
  • If they match, identity - nothing changes.

After the video is fitted, it stretches or compresses the audio to the exact new duration via _fit_audio_to_duration, so the waveform ends precisely where the video does. The whole thing runs frame-exact on tensors, no re-encode needed.

The reason it takes native_reference_frames rather than just trusting a duration number is that "the duration" is defined by the native render - the ground truth the editor's timeline was built around. That's also why the "R21" in the name matters: it's the fixed revision of this reconciliation logic in the pack's release lineage.

Inputs and outputs

Required: delivery_frames, audio, native_reference_frames (the native H3 render), and delivery_fps (e.g. 48 after RIFE, 24 native). Optional: native_fps (default 24). Outputs: the corrected delivery_frames and audio, plus report - a JSON string that spells out the before/after frame counts, the action taken, and the audio fit. That JSON report is worth reading once; it's the cleanest explanation of exactly what your render lost or gained.

Installing it

Part of IAMCCS-nodes: ComfyUI Manager (search "IAMCCS") or git clone https://github.com/IAMCCS/IAMCCS-nodes.git into custom_nodes, restart. No extra dependencies.

Where people get burned

Feed it the wrong reference. The node hard-fails with a ValueError if either frame set is empty - it refuses to guess a duration. And remember this node fixes duration, not speed: if RIFE changed the motion feel, that's an interpolation question, not a trimming one. Also, the "hold last frame" padding mode creates a frozen final frame - fine for a beat at the end of a shot, bad if the drift is in the middle. If your mid-video sync is off, the problem is upstream (in the tiling), and this node is a band-aid, not a cure.

CategoryIAMCCS/MiniMax H3/Atomic Backend

Inputs (5)

NameTypeDefaultDescription
delivery_framesIMAGE
audioAUDIO
native_reference_framesIMAGE
delivery_fpsINT
native_fpsoptINT241–240

Outputs (3)

NameTypeDescription
delivery_framesIMAGE
audioAUDIO
reportSTRING