ComfyUI Node

MiniMax H3 Loop

Make the loop point just another frame boundary

By pxl-pshr·Created 23 days ago·Updated 3 days ago· 59
MiniMax H3 Loop
  • model
  • MODEL
◄pad_clips1►
◄views2►

Ask for a seamless loop in ComfyUI and someone will hand you the first-frame/last-frame trick: pin the last frame to the first frame and hope the model closes the gap. It works about as well as it sounds. The join lands where the model is mid-shot, and "seamless" becomes a hitch or a slow-motion collapse in the last half second.

MiniMax H3 Loop attacks it from underneath instead of on top. It's a model patch, not a video node: it changes how the sampler sees the latent, so the end of the loop is denoised with the beginning actually sitting next to it as context. No crossfade, no second pass, no reference frame pinned anywhere.

What it actually does

MiniMax H3's video latents arrive in 17-frame clips of 5 latent frames. A 17k+5 frame video is k clips plus a two-latent tail - and that tail is shaped exactly like the first latents of the sequence, so it can be filled with the start of the loop. That's the trick the whole pack is built on.

The node clones your model and registers two wrappers, one on the diffusion model and one on the sampler. Every model call then sees the loop with pad_clips wrapped 17-frame clips tacked on each side, and keeps the middle. So the end-to-start join gets denoised like any other clip boundary, with real context on both sides, and the hard sequence edges land in padding that gets thrown away.

This is why length must be 17k+5. 107, 158, 209, 260, 311, 362 - those are the numbers that keep the audio loop exact. The loop itself is the 17k: 158 gives you a 6.4-second loop.

The inputs you'll touch

model is the only wire in: whichever loader is giving you the H3 checkpoint. pad_clips (1–8, default 1) is the dose. The author's own note is the honest description - 17-frame clips of wrapped context on each side, and each one adds sampling time (about 34% at 209 frames with pad_clips 1). It also stretches what the model sees, so 311 frames becomes 345 and stays inside H3's 362-frame ceiling, while 362 becomes 396 and blows past it.

views (1 or 2, default 2) is the one people toggle in a panic. With a single view, H3's audio stream goes loud and garbled near the loop point - 3 to 10× the normal level, because the wrap context is duplicated at the same place on every step. views 2 additionally samples the loop rotated by half, puts that view's wrap point mid-loop, and blends the two audio predictions by distance from each wrap point. Costs about 1.8× sampling time. The picture stays on the first view: blending both let the views settle on opposite directions of motion and reverse it mid-loop.

One output, MODEL, into BasicGuider / BasicScheduler as usual, then SamplerCustomAdvanced. Just don't decode with a plain VAE Decode. Hand the latent to MiniMax H3 Loop Decode or you've paid for the wrap and thrown it away.

Install

ComfyUI Manager, search the pack title; or:

cd ComfyUI/custom_nodes
git clone https://github.com/pxl-pshr/ComfyUI-MiniMaxH3-Loop

Restart. There's no requirements.txt in this repo, so nothing pip-installs - it's pure Python talking to ComfyUI internals. Which is also why it hard-requires ComfyUI v0.42.0 or newer: it imports comfy_extras.nodes_minimax_h3 directly.

You need the H3 stack: minimax_h3_ref2va_pruned_int8_convrot.safetensors in diffusion_models, the qwen3vl text encoder, and both VAEs. The example workflows carry download links, so ComfyUI offers to fetch the missing ones.

Where people get burned

Nothing in the node list, or FastH3 throwing "size of tensor a (24) must match the size of tensor b (768)." Both mean an old ComfyUI. The pack imports H3 internals at load time, so below v0.42.0 all four nodes vanish together and it reads like a broken install. FastH3-Omni also stores per-step output heads that older builds can't load.

"views 2 can't be combined with the Fun ControlNet." Real and intentional. The Fun ControlNet encodes one unrotated control latent, and a rotated view would misalign it. Set views to 1 and keep it there.

Apply order with ControlNet. model → MiniMax H3 Loop → Apply MiniMax H3 Fun ControlNet. Reversed, it errors, because the ControlNet sizes its control latent from what it sees.

A pop at the loop point that isn't a seam. Try other seeds first - pops that look like join problems show up in a plain render with that seed too. Then fix the prompt: describe a state that keeps going instead of a sequence of events. Locked-off camera, one subject doing one cyclic thing, nothing that piles up (spilled liquid and puddles reset at the loop point), no [0s-2s] timelines. And prefer a reference image over a first-frame anchor - H3 reads a pinned frame as a shot start, so the exposure drifts (35 → 50 mean brightness in the author's test).

One non-technical thing before you download 40 GB: the H3 Community License excludes the US, EU, UK and South Korea from its applicable territory. The hosted Hailuo API is fine; the local weights are the gated part.

Categorymodel/patch/minimax

Inputs (3)

NameTypeDefaultDescription
modelMODEL—
pad_clipsINT11–817-frame clips of wrapped context added on each side of the loop. Each clip adds sampling time.
viewsoptINT21–22 also samples the loop rotated by half and takes the audio around the loop point from it. Fixes garbled audio there; about 1.8x sampling time. Not usable with the Fun ControlNet.

Outputs (1)

NameTypeDescription
MODELMODEL—