Nodes/MiniMax H3 Activation Chunk - Star7/Reference Video Load - Star7
ComfyUI Node

Reference Video Load - Star7

H3 reference videos balloon your token count. Load them like this.

By star7code·Created about a month ago·Updated 4 days ago· 20
Reference Video Load - Star7
    • reference_video
    • reference_audio
    • frame_count
    • report
    video
    max_long_edge720
    allow_upscalefalse
    trim_enabledfalse
    trim_start_seconds0.0
    trim_end_seconds0.0

    MiniMax H3's video-to-video is the part people get excited about - feed it a clip and it does motion transfer that a chunk of the community compares to Kling. The problem: that reference clip becomes tokens. The README's own diagnostic shows a raw reference producing a packed sequence of 103,546 tokens versus 87,101 after the canvas is capped - and the sequence length is the single biggest lever on both VRAM and per-step time. Feed H3 a 30fps 1080p clip straight off your phone and you've just told it to pay attention to a hundred thousand tokens.

    Reference Video Load - Star7 is the guardrail. It's a self-contained loader that normalizes any reference clip to exactly what H3 wants, so you don't accidentally hand the model a bloated sequence:

    • 24fps, hard. H3's layout expects it, and the node enforces it regardless of the source.
    • 15 seconds max (360 frames), so nobody's 8-minute home movie sneaks in.
    • Long-edge fit to an H3-aligned size - default 1344, keeping the video's orientation (portrait stays portrait).
    • Frame count aligned to the 17n+5 grid. H3's temporal layout wants frame counts of the form 17n+5, so the loader trims to the largest count that fits.
    • Soundtrack extraction at 44.1kHz stereo, up to 15 seconds, decoupled from the frame grid so a longer clip's tail audio isn't chopped.

    Inputs and outputs

    The inputs are simple: video (upload or pick from your input folder), max_long_edge (default 1344, step 32, range 32–8192), and allow_upscale (default off - leave it off unless you're specifically A/B testing structure, because upscaling spends H3 tokens on interpolated detail).

    The outputs are where the wiring happens:

    • reference_video (IMAGE) → H3 Conditioning's ref_video
    • reference_audio (AUDIO) → H3 Conditioning's ref_audio
    • frame_count (INT) and report (STRING) → diagnostics; wire report to a text node to see the actual frames/canvas the loader chose.

    A subtlety worth knowing about audio: audio_mode=native lets H3 regenerate sound from the reference, and it will not reproduce the original track verbatim. If you need the original audio preserved, the README's path is to route this node's reference_audio to drive_audio, set audio_mode=lock_source, and mux with T8's mux_audio at the end. And if your reference has no soundtrack at all, the node just returns audio as None and the report says so.

    Installing it

    Same pack as everything else in the Star7 H3 family - ComfyUI Manager (search MiniMax H3 Activation Chunk - Star7) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/star7code/minimax-h3-chunk-star7.git
    

    Restart ComfyUI. The one real dependency to be aware of is FFmpeg: the node resolves it independently of VideoHelperSuite, first via imageio-ffmpeg (which most ComfyUI installs already carry) and then from PATH. So unlike VHS, it doesn't drag a whole node pack in just to decode a clip.

    Troubleshooting

    • FFmpeg was not found - that's this node. Fix it with pip install imageio-ffmpeg or by putting a real ffmpeg on PATH. It won't come from installing VHS.
    • "must contain at least 5 frames" - the reference is under 5 frames at 24fps; nothing to condition on.
    • Trimmed shorter than expected - you hit the 15-second cap or the 17n+5 alignment stepped on the tail. That's by design; check the report output to confirm what you actually got.
    • Everything is a local decode - no uploads to MiniMax, no API, no key. All four nodes in this pack run entirely on your machine.

    One note that isn't about the node: H3's weights are territory-restricted by the MiniMax H3 Community License (excluded regions: US, EU, UK, South Korea), so make sure you're licensed to run the model before investing in reference workflows for it.

    CategoryStar7/MiniMax H3

    Inputs (6)

    NameTypeDefaultDescription
    videoCOMBO0 options:
    max_long_edgeINT7200–8192The reference video keeps its aspect ratio and is fitted to this H3-aligned long edge; 0 keeps the source size.
    allow_upscaleBOOLEANfalseDisabled avoids spending H3 reference tokens on interpolated detail. Enable only for structure/motion A/B tests.
    trim_enabledBOOLEANfalseEnable a lightweight time window. Disabled loads the complete source video.
    trim_start_secondsFLOAT0.00–86400Start position in seconds.
    trim_end_secondsFLOAT0.00–86400End position in seconds. The UI reads the selected video's duration; 0 means through the end.

    Outputs (4)

    NameTypeDescription
    reference_videoIMAGE
    reference_audioAUDIO
    frame_countINT
    reportSTRING