Nodes/ComfyUI-Arisu-Nodes/MiniMax H3 Hybrid to Video (Advanced)
ComfyUI Node

MiniMax H3 Hybrid to Video (Advanced)

The second sampler finally gets sharp keyframes

By swqa7697·Created 5 days ago·Updated about 12 hours ago· 4
MiniMax H3 Hybrid to Video (Advanced)
  • clip
  • vae
  • audio_vae
  • first_frame
  • last_frame
  • ref_images
  • ref_videos
  • ref_video_audios
  • ref_audios
  • positive
  • latent
  • positive (upscaled)
prompt
width1344
height768
target_width2688
target_height1536
length124
ref_image_sizematch
frame_picture_tagsafter_refs

The Advanced version of MiniMax H3 Hybrid to Video exists for one workflow: two-sampler latent upscaling, where sampler 1 generates at base resolution, a latent upscaler (like Minimax H3 Latent Upscaler (3D)) enlarges the video latent, and sampler 2 refines it at the higher size. It is the whole hybrid node - keyframes, references, prompt - plus the bookkeeping that makes that second pass actually work.

Here's the failure it fixes, because you will hit it the first time you try a two-sampler H3 upscale with the plain node. The keyframe latents inside your first-pass conditioning were encoded at the generation size. Feed that conditioning to sampler 2 and it dies with something like:

RuntimeError: shape mismatch: value tensor of shape [7546, 96] cannot be broadcast to indexing result of shape [15106, 96]

Resampling the keyframe latents onto the new grid sidesteps the crash but blurs the anchors - the sharp frame-0 detail you pinned gets smeared. The Advanced node's trick is to skip latent resampling entirely: it re-encodes the original pixel keyframes at the upscaled size, so sampler 2 gets anchors as crisp as the first pass had.

The inputs and outputs that matter

Everything from the hybrid node, plus:

  • target_width, target_height - the size of the upscaled video as produced by the latent upscaler between the two samplers (defaults 2688×1536). Multiples of 32. An advertising MiniMax H3 Video Settings (Upscale) node drives these for you; the plain settings node doesn't advertise targets, so they stay manual there.
  • Outputs: positive and latent for sampler 1 (identical to the plain hybrid node, so it drops in without rewiring), plus positive (upscaled) - the same prompt embeddings and references, with keyframes encoded at target_width × target_height.

Two nice properties from how it's built. When the target size equals the generation size, nothing is encoded twice and positive (upscaled) is literally the same conditioning as positive. And reference images are sized per pass: with ref_image_size = match the upscaled pass carries larger reference tokens (and samples slower), while reference videos and audio never depend on resolution and are encoded once, shared between both conditionings.

Wiring it

                     ┌─ positive ──────────▶ Guider 1 ─▶ Sampler 1 ─▶ Latent Upscaler ─▶ Sampler 2
Hybrid (Advanced) ───┼─ latent ────────────▶ Sampler 1                                     ▲
                     └─ positive (upscaled) ───────────────────────▶ Guider 2 ────────────┘

The latent upscaler's output size must equal target_width × target_height. With the H3 Latent Upscaler (3D) use its target-dimensions mode with the same numbers, or check its multiplier lands there after its own 32-pixel alignment. Keep the target aspect ratio equal to the generation aspect unless you want a different crop in the second pass - the first keyframe is stretched and the last is center-cropped at both sizes.

Installing it

Same pack, same requirements as the plain hybrid node: ComfyUI-Arisu-Nodes (zero runtime dependencies), ComfyUI ≥ 0.30.0, and the H3 checkpoint/CLIP/video VAE/audio VAE. Manager → Install Custom Nodes → "ComfyUI-Arisu-Nodes", or clone into custom_nodes and restart.

cd ComfyUI/custom_nodes
git clone https://github.com/swqa7697/ComfyUI-Arisu-Nodes.git

Gotchas

The scope is worth stating so you don't get surprised: this covers the keyframes this node itself encodes. Frames added later by Add Guide for MiniMax H3 or a motion-context node are not covered - anchor those against the latent of the pass they belong to. And as ever with H3, remember the territorial licence: the MiniMax H3 Community License excludes the US, EU, UK, and South Korea from running the local weights. Where it's allowed, this is the missing piece that makes a real latent-upscale H3 pipeline stop crashing on its own conditioning.

CategoryArisu Nodes/MiniMax H3

Inputs (17)

NameTypeDefaultDescription
clipCLIP
vaeVAEVideo VAE; encodes keyframes and visual references.
promptSTRING
widthINT134432–16384
heightINT76832–16384
target_widthINT268832–16384Width of the upscaled video, as produced by the latent upscaler between the two samplers.
target_heightINT153632–16384Height of the upscaled video, as produced by the latent upscaler between the two samplers.
lengthINT1245–3600Frame count at 24 fps, snapped up to the model's 17k+5 grid (124 = ~5s; trained range is ~124-362).
ref_image_sizeCOMBOmatchReference image sizing. 'match' scales each ref (down only, keeping aspect) to the generation's pixel area; 'max' uses the reference pipeline's 2048px short edge for best identity fidelity. Reference tokens ride through every sampling step, so 'max' can be several times slower.
frame_picture_tagsCOMBOafter_refsHow the first/last frames appear to the text encoder. 'after_refs': reference images keep <Picture 1..n> and the frames follow as <Picture n+1..>. 'before_refs': the frames take <Picture 1..> and references are numbered after them. 'none': the frames only pin the video and are invisible to the prompt.
audio_vaeoptVAEAudio VAE, needed only when a reference audio or a reference video soundtrack is connected.
first_frameoptIMAGEKeyframe pinned at frame 0; stretched to the canvas.
last_frameoptIMAGEKeyframe pinned at the last frame; center-cropped to the canvas.
ref_imagesoptCOMFY_AUTOGROW_V3
ref_videosoptCOMFY_AUTOGROW_V3
ref_video_audiosoptCOMFY_AUTOGROW_V3
ref_audiosoptCOMFY_AUTOGROW_V3

Outputs (3)

NameTypeDescription
positiveCONDITIONING
latentLATENT
positive (upscaled)CONDITIONINGSame prompt and references, with the keyframes encoded at target_width x target_height.