Nodes/ComfyUI-MiniMaxH3-Contex-Loop/MiniMax H3 Reference Video Prep
ComfyUI Node

MiniMax H3 Reference Video Prep

Normalize any source into a clean one-pass H3 performance reference

By ethanfel·Created 17 days ago·Updated about 18 hours ago· 315
MiniMax H3 Reference Video Prep
  • source_video
  • source_frames
  • source_audio
  • ref_video
  • source_audio
  • length
  • status
length209
source_fps24.000

Ref2VA is picky about its inputs: the reference video has to be an exact H3-valid length, at H3's 24 fps, with the soundtrack still synced. Get any of those wrong and your "performance reference" either fails to load or arrives warped. This node is the normalization step that takes a native VIDEO (or a decoded frame batch plus audio) and turns it into an exact one-pass H3 reference - sampling the video at 24 fps and copying the soundtrack rather than regenerating or stretching it.

What it does

You set length (an exact H3 length, satisfying length % 17 == 5; valid defaults like 209 are suggested, range 5–3592 in steps of 17) and the node does the rest. Input options:

  • source_video - native ComfyUI VIDEO from core Load Video. Its frames, embedded audio, and exact FPS are decoded directly; source_fps is ignored for this path.
  • source_frames - a decoded IMAGE batch from VHS or another loader, in which case you must supply the real source_fps.
  • source_audio - the soundtrack paired with source_frames, or an override for native VIDEO audio. The node copies its opening samples exactly; it never time-stretches or silently pads them, so if your audio doesn't cover length at 24 fps, that's an error you'll want to see.

Outputs:

  • ref_video - the source performance sampled at H3's 24 fps for Ref2VA.
  • source_audio - the original waveform cut exactly to the selected duration.
  • length - the validated frame count, for the stock Ref2VA length input.
  • status - input route, source timing, selected frame count, and copied audio.

The point of "copying, not regenerating" is subtle and worth internalizing: H3 can generate audio, but for a performance reference the whole job is fidelity to the original. This node makes sure the soundtrack stays the soundtrack.

Install and gotchas

cd ComfyUI/custom_nodes
git clone https://github.com/ethanfel/ComfyUI-MiniMaxH3-Contex-Loop.git

Restart, or install via ComfyUI Manager under "MiniMax H3 Contex Loop". No pip step; a current ComfyUI with native Add Guide (PR #15439) is expected, and ffmpeg on PATH is preferred. Models aren't bundled - mind the MiniMax H3 Community License territory restriction.

Where people get burned: picking a length the source can't cover. It's exact - no padding, no stretching - so a 90-frame source and a 124-frame request fails on purpose. Pick the largest valid length your source actually spans, or trim the source first (MiniMaxH3ContexTrimSourceAV is made for that).

Categoryconditioning/minimax/contex_loop

Inputs (5)

NameTypeDefaultDescription
lengthINT2095–3592Exact H3 output/reference length. It must satisfy length % 17 == 5. The source video and copied soundtrack must both cover it.
source_fpsFLOAT24.0000.001–1000Actual frame rate represented by source_frames. It is ignored for native VIDEO, which carries its own exact FPS.
source_videooptVIDEONative ComfyUI VIDEO from core Load Video or another VIDEO loader. Its frames, embedded audio, and exact FPS are decoded directly.
source_framesoptIMAGEDecoded IMAGE batch from VHS or another loader. Connect this instead of source_video and provide its actual source_fps.
source_audiooptAUDIOSoundtrack paired with source_frames, or an override for native VIDEO audio. The node copies its opening samples exactly; it never time-stretches or silently pads them.

Outputs (4)

NameTypeDescription
ref_videoIMAGEThe source performance sampled at H3's 24 fps for Ref2VA.
source_audioAUDIOThe original source waveform cut exactly to the selected duration.
lengthINTValidated H3 frame length for the stock Ref2VA length input.
statusSTRINGInput route, source timing, selected frame count, and copied audio.