Open-source project
NikoDemon80/ComfyUI-H3-Motion-Context avatar
NikoDemon80/ComfyUI-H3-Motion-Context

ComfyUI-H3-Motion-Context: chaining MiniMax H3 clips without a pixel round trip

Clip chaining for MiniMax H3 in ComfyUI - motion and audio genuinely continue across joins

967 stars107 forksPythonGPL-3.0

At a glance

What is it?
A ComfyUI custom node pack that carries the tail of the previous H3 clip forward as a latent, picture and audio together, so the next clip continues the motion and the soundtrack instead of restarting them.
Who is it for?
Adopt it if you are already generating MiniMax H3 video in ComfyUI at 0.34.0 or newer and your problem is joins: colour drift, softening, or a soundtrack that restarts at every cut. Skip it if you only need to anchor a still or a single short clip, because the built-in Add Guide for MiniMax H3 node already does that and the README says so.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 13 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 16, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The join is the problem this pack was built for

ComfyUI can anchor a still or a short clip at any frame of a MiniMax H3 generation through the Add Guide for MiniMax H3 node. The README is direct about this: if that is all you need, use it, and you do not need this pack. The author is not pretending the built-in node is broken.

Chaining is the different problem. Two things go wrong when you extend a clip by feeding the previous output back in as an image guide. First, the picture leaves the latent space and comes back: every join costs a decode, a resize and a re-encode, and that round trip is where colour drift and softening accumulate down a long chain. Second, the sound restarts. Add Guide anchors audio starting at a frame and running forward, so the model writes a new take that resembles the old one rather than continuing the track that already played. On anything with a beat, the README argues, you hear the difference immediately.

So the audience is narrow and specific. It is someone generating H3 video and audio together in ComfyUI, working in clips, and stitching them into something longer than one generation allows. If your output is a single clip, this pack adds nodes you will never wire.

How the latent is carried across runs

The mechanism has two halves, and the picture half is easier to describe. Instead of decoding the previous clip to pixels and re-encoding it as a guide, the pack slices the previous clip's tail straight out of its latent. The pinned frames are therefore the same numbers the model produced, bit for bit, with no colour or contrast shift introduced by a VAE round trip. That is also why the README claims it is faster: the decode and encode steps are simply absent.

The audio half is the part the author calls the harder and more useful one. Add Guide anchors audio starting at a frame and running forward. To continue a soundtrack, the pinned window has to end at the join and reach backwards into sound that has already played. That inversion is the difference between continuation and imitation.

Moving the latent between runs is the awkward part. You cannot wire the sampler output directly into the node's context_latent input, because the latent you want belongs to the previous run, not the current one, and ComfyUI correctly rejects that as a circular connection. Two helper nodes move it through a file the same way frames and audio already move. The repository layout backs this up: nodes.py holds the main nodes, probe_node.py holds the Seam Probe, and layout_contract.py is the module that checks the pack's arithmetic against the live ComfyUI code before the first render. If ComfyUI changes an assumption, the node refuses to run and says what moved. A loud failure instead of a bad render is a defensible design choice, though it does mean a ComfyUI update can stop your chain until the pack catches up.

Installing it and generating a first chained clip

Installation is a folder copy, not a package install. Drop the folder into ComfyUI/custom_nodes/ and restart ComfyUI. At startup the pack prints a single line confirming the nodes registered, and states that ComfyUI is not modified and that the layout checks run on first use of a Motion Context node. Nothing else changes in your existing H3 workflows.

The first time you actually chain a clip, a second line appears:

bash
h3_motion_context: ComfyUI H3 layout checks passed, anchors and pinned audio will land where intended

If you see anything else, the node refuses to run and logs the reason. On ComfyUI 0.33.4 or older it tells you so and points at version 0.3.1, which the README says runs on both. The version requirement is 0.34.0 or newer, because that is where H3 gained arbitrary keyframe anchors.

The wiring follows the pack's own diagram. The H3 image-to-video, reference-to-video or text-to-video path feeds the Motion Context node, which feeds the guider and sampler. After decoding you get IMAGE and AUDIO, and those go through the Trim node before Create Video or a save node.

text
MiniMaxH3ImageToVideo / MiniMaxH3ReferenceToVideo (or the t2v path)
  -> H3 Motion Context      <- previous clip's latent (picture + sound)
  -> guider / sampler
  ...
  decoded IMAGE + AUDIO
  -> H3 Motion Context Trim         <- wire trim_frames across
  -> Create Video / save

The pinned frames come back at the start of the new clip, so the Trim node removes them before you concatenate, picture and sound together. Wire trim_frames into Trim. On the very first clip, Load 0 does not read a file: Motion Context passes the conditioning through and reports trim_frames 0, so you can leave the node enabled rather than muting it.

Carrying the previous clip across runs uses the Save and Load pair. First clip: Load 0, Save 1. Making clip 2 from clip 1: Load 1, Save 2. The indices mean what they say.

text
this run:   SamplerCustomAdvanced -> H3 Motion Context Save Latent
next run:   H3 Motion Context Load Latent -> context_latent

Do not walk the chain with queue run on change. Each index change is a separate graph edit, so two widgets incrementing will queue two runs and skip slots. Use the H3 Motion Context Chain node instead of ComfyUI's Run button. The Chain node only sees Load and Save if all three sit in the same canvas group, which is one of the coloured boxes you draw around nodes. Select Load, Save and Chain, then Group Selected. Without that grouping, the README states plainly, every button does nothing. Run/Re-roll queues at the current indices without advancing them, Approve advances both and queues once, and Chain is Approve on a loop, with the segments widget setting how many clips the loop runs before stopping. Zero means keep going until you click Stop.

Where it will waste your time

The strongest limitation is one the README states itself: for a single anchor, the built-in Add Guide for MiniMax H3 node is sufficient and this pack is unnecessary. Anyone who installs it expecting a general H3 improvement will find extra nodes, an extra file convention and a grouping requirement for no gain.

The version floor is the second constraint. ComfyUI 0.34.0 or newer is required for chaining, and the fallback for older builds is version 0.3.1, which is a different, older code path rather than a fix. The check is read from the layout code rather than a version number, so the README says a nightly or a fork gets the right answer, but the answer may still be no.

The file convention is a real operational cost. Chain slots are written into the Load folder as clip_00001.safetensors and so on, and the Clear latents button deletes those numbered slots. Files you renamed are left alone, and indices stay put after a clear. Auto-saved files, written when Save is 0, get a trailing underscore and are numbered by run rather than by clip, and indexed loading skips them on purpose. If you generate a lot of clips, that folder grows and you are responsible for it. The Load node's output is only for context_latent; wiring it into a decode node is wrong, and stock Save/Load Latent will not substitute because it cannot handle H3's paired video and audio latent.

Finally, the Chain node's dependence on canvas grouping is a failure mode with no error message. The buttons simply do nothing. That is a design decision inherited from how ComfyUI exposes node context, but it is the kind of thing that costs a new user an hour.

How it differs from Add Guide and from stitched pixel workflows

The honest alternative is the one the README names: Add Guide for MiniMax H3. It anchors images and encodes them, and it is built into ComfyUI. The difference in approach is exactly the round trip. Add Guide takes images, so chaining through it means decode, resize, encode at every link, and the accumulation of colour drift and softening that follows. This pack keeps the tail in latent space, so the pinned frames are the original numbers.

The audio difference is the more consequential one. Add Guide anchors audio starting at a frame and running forward. This pack's pinned audio window ends at the join and reaches backwards. That is a structural difference, not a quality setting, and it is the reason the README calls audio the more useful half of the project.

A third approach, common in practice, is to generate clips independently and stitch them in an external editor. That gives you full control over the cut and no dependency on a custom node, but it does not continue motion or sound across the join at all. You are choosing a visible cut on purpose. If that is acceptable for your project, the pack solves a problem you do not have. The Seam Probe node exists for the case where you want to measure whether a join is a real continuation or a convincing imitation, which is a more useful framing than eyeballing it.

Maintenance, licence and what a chain costs you

The repository is not archived, and the last push was on 2026-09-06, which is recent. Releases v0.6.0, v0.6.1 and v0.6.2 all landed within three days of each other in early September 2026, and the release notes name small, specific fixes: segments and Clear latents in 0.6.0, a YARA fix and CSRF on the Clear and slot routes in 0.6.1, and a blank Chain segments value being treated as 0 in 0.6.2. The presence of csrf_guard.py in the repository root is consistent with that second note. That is a project being maintained against real defects rather than a project being left alone, and the version is 0.6.2 at the time of writing.

The upgrade cost is tied to the layout contract. Because the nodes verify their arithmetic against the live ComfyUI code before the first render and refuse to run when an assumption breaks, a ComfyUI update can halt your chain until the pack is updated. That is the trade the author chose deliberately, and it is the right trade for a tool whose failure mode is a subtly wrong render. Budget for it anyway: a ComfyUI nightly can stop a long chain mid-run.

The licence is GPL-3.0, declared in pyproject.toml and shipped as a LICENSE file. If you are embedding this in a distributed product, that is a copyleft licence and it will affect how you can combine and redistribute the code. That is a factual consequence of the licence identifier, not legal advice; if distribution matters to you, take it to someone qualified.

Editorial conclusion

Adopt it if you are already generating MiniMax H3 video in ComfyUI at 0.34.0 or newer and your problem is joins: colour drift, softening, or a soundtrack that restarts at every cut. Skip it if you only need to anchor a still or a single short clip, because the built-in Add Guide for MiniMax H3 node already does that and the README says so. Before committing to a long chain, verify three things: that your ComfyUI build prints the layout checks passed line on first use, that the Chain node, the Load node and the Save node all sit inside the same canvas group, and that your Load folder is somewhere you are happy to have clip_00001.safetensors and its numbered siblings written.

Frequently asked questions

What ComfyUI version does ComfyUI-H3-Motion-Context need?

ComfyUI 0.34.0 or newer, because that is where H3 gained arbitrary keyframe anchors. On 0.33.4 or older the node says so and points you at version 0.3.1, which the README says runs on both. The check reads the layout code rather than a version number, so a nightly or a fork gets the right answer.

Why does the Chain node in ComfyUI-H3-Motion-Context do nothing when I click it?

The Chain node only sees the Load and Save nodes if all three sit in the same canvas group. Select Load, Save and Chain, then use Group Selected, or drop Chain into the existing Motion Context group. Without that grouping, the README states that every button does nothing.

Can I use the stock Save/Load Latent nodes with ComfyUI-H3-Motion-Context?

No. The stock nodes cannot handle H3's paired video and audio latent, which is why the pack ships its own Save Latent and Load Latent pair. The Load node's output is only for context_latent and should not be wired into a decode node.

Official sources

  1. Issues
  2. License: GPL-3.0
  3. NikoDemon80/ComfyUI-H3-Motion-Context on GitHub
  4. README
  5. Releases
Community notes

Community notes