Nodes/ComfyUI-MiniMaxH3-MediaPrompt/MiniMax H3 Video Settings
ComfyUI Node

MiniMax H3 Video Settings

The Node That Knows 17k+5

By YingsenP·Created 2 months ago·Updated about a month ago· 1
MiniMax H3 Video Settings
    • video_length
    • first_width
    • first_height
    • total_steps
    • separate_steps
    • upscale_factor
    • lora_strength
    • frame_rate
    ◄video_length10►
    ◄aspect_ratio16:9 (Widescreen)►
    ◄first_resolution0.5 (540P)►
    ◄total_steps8►
    ◄separate_steps2►
    ◄upscale_factor1.40►
    ◄lora_strength1.00►
    ◄frame_rate24►

    Unlike everything else in this pack, this node touches no pixels and no references. It's a calculator: you give it a duration and a shape, it hands back the frame count, the resolution and the sampling settings a two-stage H3 video run needs.

    Why a calculator earns a node

    MiniMax H3 has opinions about frame counts. Its latent grid only accepts lengths on a 17k + 5 cadence - 124 frames, 141, 158, and so on - because the video and audio latents travel together and the audio stream needs the aligned temporal structure. Canvas dimensions get rounded to multiples of 32. Core's Empty MiniMax H3 AV Latent will silently snap a bad number up for you, so you can be sloppy there, but a two-stage workflow repeats the same numbers in several places: the latent node, the sampler, the upscaler, the video combine. Type 240 in one box and 243 in another and you get a mystery. This node computes the set once and fans it out.

    What it does with your numbers

    video_length is in seconds, despite the name - the default of 10 with frame_rate at 24 gives 240 frames, which rounds up the 17k + 5 grid to 243. frame_rate is an integer input (1–240) and only feeds that calculation.

    aspect_ratio offers the eight usual suspects - 1:1 through 21:9. first_resolution is the eight-step preset ladder from 0.2 (360P) to 0.9 (720P). For 16:9 those presets are literal lookup values, so the default pair of 16:9 and 0.5 (540P) gives you exactly 960 × 544. Pick anything else and the node keeps the same pixel budget and refits it to your ratio, rounded to multiples of 32 - so 9:16 at the same preset comes out 544 × 960, and 21:9 comes out 1088 × 480. Square at 0.5 is 736 × 736.

    The remaining four inputs aren't computed, just carried: total_steps (default 8), separate_steps (default 2, the second stage's step count), upscale_factor (1.4), and lora_strength (1.0). They exist so one node drives both passes.

    Outputs and where they go

    Eight outputs, in order: video_length (the aligned frame count), first_width, first_height, total_steps, separate_steps, upscale_factor, lora_strength and frame_rate.

    The first three go into Empty MiniMax H3 AV Latent (or straight onto the conditioning node, if you're using MiniMax H3 Image to Video / Reference to Video, which take width, height and length themselves). total_steps and separate_steps feed your samplers - base pass and second pass. upscale_factor goes into the upscale stage between them; the repo's most recent commit message reads like a note that the intended second stage is a latent upscale rather than a pixel-space ESRGAN pass, which is the cheaper route and the one that keeps the two passes in the same latent space. lora_strength goes into your LoRA loader. Worth saying plainly: it's a strength value, not a weight loader, and H3 LoRA support in the wild is still thin, so treat it as convenience plumbing.

    frame_rate comes out as a FLOAT rather than the integer you typed, because that's the type VHS_VideoCombine expects on its frame rate input. Small thing. Saves a conversion every time.

    Install

    It's part of the same pack - one clone, no dependencies:

    cd ComfyUI/custom_nodes
    git clone https://github.com/YingsenP/ComfyUI-MiniMaxH3-MediaPrompt.git
    

    Restart ComfyUI, or find it in Manager as MiniMax H3 Media Prompt. It sits under MiniMax H3/Video rather than with the media prompt nodes, so don't go hunting for it in the wrong submenu.

    The trap: duration is not free

    H3's published trained range is roughly 124 to 362 frames at 24 fps - that is 5 seconds to 15 seconds, and it matches the 4–15 second claim on the model. The default 10 seconds sits comfortably inside it; 15 seconds lands exactly on 362. Push to 20 seconds and this node hands you 481 frames, which is outside the distribution the model was trained on. Nothing stops you. It just doesn't look like the samples anymore.

    So use this node for what it's good at - getting the frame count right and the resolution consistent across both stages - and treat video_length as having a soft ceiling around 15 seconds rather than the 10000 the field technically accepts.

    CategoryMiniMax H3/Video

    Inputs (8)

    NameTypeDefaultDescription
    video_lengthINT101–10000—
    aspect_ratioCOMBO16:9 (Widescreen)8 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +2
    first_resolutionCOMBO0.5 (540P)8 options: 0.2 (360P), 0.3 (416P), 0.4 (480P), 0.5 (540P), 0.6 (608P), 0.7 (640P), +2
    total_stepsINT81–10000—
    separate_stepsINT21–10000—
    upscale_factorFLOAT1.400.01–100—
    lora_strengthFLOAT1.00-10–10—
    frame_rateINT241–240—

    Outputs (8)

    NameTypeDescription
    video_lengthINT—
    first_widthINT—
    first_heightINT—
    total_stepsINT—
    separate_stepsINT—
    upscale_factorFLOAT—
    lora_strengthFLOAT—
    frame_rateFLOAT—