ComfyUI H3 Motion Context slices the previous latent instead of re-encoding it, and refuses to run when it cannot
Clip chaining for MiniMax H3 in ComfyUI - motion and audio genuinely continue across joins
At a glance
- What is it?
- A ComfyUI custom node pack for chaining MiniMax H3 clips so picture and sound continue across a join, with a paired latent carried across runs through files, a clip_index that means two different things depending on which node you are on, and a layout check that reads the live ComfyUI code before the first render.
- Who is it for?
- This pack suits someone already chaining MiniMax H3 clips in ComfyUI on 0.34.0 or newer who has watched colour drift accumulate through an Add Guide round trip and wants the audio to actually continue.
- 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 29 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 October 5, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Three releases in three days, and two supported versions at once
The release history is three tags in three consecutive days, and each tag name is a sentence: v0.6.0 on 2026-09-04 reads Chain is Approve on a loop, segments, Clear latents, v0.6.1 on 2026-09-05 reads YARA fix, CSRF on Clear/slot routes, and v0.6.2 on 2026-09-06 reads blank Chain segments is 0. The packaging version reads 0.6.2, matching the newest tag and the last push on 2026-09-06.
Tag names written as behaviour descriptions make the history readable and make it impossible to scan. Nothing in the three titles marks one as breaking, and a v0.6.2 that turns a blank segments field into zero is exactly the kind of change that alters a loop's meaning for someone with an old workflow saved.
Meanwhile two versions are supported at the same time. The current pack requires ComfyUI 0.34.0 or newer, which is where H3 gained arbitrary keyframe anchors, and version 0.3.1 runs on that and on everything older. The classifier still says Development Status 4 Beta, so this is a pre-1.0 project carrying two live install paths and a CHANGELOG.md that the readme points to for the details.
A video node pack that ships its own CSRF guard and a Clear button
Look at what sits at the top level of the repository: `csrf_guard.py`, a `web/` directory, `nodes.py`, `layout_contract.py`, `probe_node.py`, `__init__.py`, `example_workflows/`, `tests/` and a `.comfyignore`. A custom node pack for video generation does not usually need an HTTP surface, but this one does, because it adds buttons.
The buttons act on files. Clear latents deletes numbered chain slots, files named `clip_00001.safetensors` and upward, in the Load folder; renamed files are left alone and the indices stay where they are. Run re-rolls overwrite the slot at the current indices rather than writing a new one. Those are destructive operations reachable from a click in a graph, which is exactly why v0.6.1 is titled YARA fix, CSRF on Clear/slot routes.
Two things follow for anyone running ComfyUI beyond their own machine. The pack brings its own guard module rather than relying on whatever the host provides, and its Clear and slot operations are worth confirming are still loopback only in your deployment. The file does not describe how the routes are exposed or authenticated, only that the CSRF protection is there.
Refusing to run is a feature: the layout check reads the live code
The readme states the design choice plainly: nothing on disk is edited, nothing in ComfyUI is modified, and the nodes check their arithmetic against the live ComfyUI code before the first render. If an update breaks an assumption they refuse to run and say what moved. A loud failure beats a bad render you don't notice.
The check happens twice, at two different moments, and the log lines tell you which is which. At startup you see `h3_motion_context: nodes registered. ComfyUI is not modified; the layout checks run on the first use of a Motion Context node.` The first time you actually chain a clip you see `h3_motion_context: ComfyUI H3 layout checks passed, anchors and pinned audio will land where intended`. Anything else and the node refuses, with the reason logged.
The version gate is deliberately not a version number. On ComfyUI 0.33.4 or older the node says so and points you at 0.3.1, and that determination is read from the layout code itself, so a nightly build or a fork gets the right answer instead of a wrong one from a string comparison.
The pinned frames are sliced out of the latent, not re-encoded
ComfyUI can already anchor a still or a short clip at any frame of an H3 generation with the Add Guide for MiniMax H3 node, and the readme is explicit that if that is all you need, you do not need this pack.
The problem it solves is that Add Guide takes images and encodes them, so every join in a chain costs a decode, a resize and a re-encode, and that round trip is where colour drift and softening down a long chain come from. This pack slices the previous clip's tail straight out of its latent instead, so the pinned frames are the same numbers they were, bit for bit. Because the latent carries both the video and the audio streams, you do not have to load the previous clip's video at all, and nothing has to be configured for it: leave `context_frames` unwired.
The latent cannot simply be wired from the sampler. ComfyUI will call it a circular connection, and it is right, because the latent you want comes from the previous run rather than this one. Two helper nodes move it across runs through a file instead, the same way frames and audio already move across:
this run: SamplerCustomAdvanced -> H3 Motion Context Save Latent
next run: H3 Motion Context Load Latent -> context_latentStock Save/Load Latent will not work, because it cannot handle H3's paired video and audio latent, and the loader's output is only for `context_latent`.
The Seam Probe exists to check the result rather than trust it: it measures whether a join is a real continuation or a convincing imitation.
The pinned audio window has to end at the join and reach backwards
Audio is called the harder half and the more useful half of this pack, because H3 generates picture and sound together rather than separately.
The mechanism is specific. Add Guide anchors audio starting at a frame and running forward, which is the wrong shape for continuing a soundtrack. To actually continue one, the pinned window has to end at the join and reach backwards into sound that has already played. The readme puts the difference plainly: this is the difference between the model continuing your track and the model writing something that sounds like it, and on anything with a beat you hear it immediately.
That is why the Trim node exists. The pinned frames come back at the start of the new clip and have to come off before you concatenate, picture and sound together, with `trim_frames` wired across. The readme describes Trim as removing the pinned head from the delivery, and the wiring diagram places it after the decoded image and audio and before Create Video or save.
So the chain is: slice the tail out of the previous latent, pin it as a window that closes at the join, generate, then cut the pinned head back off the result. Two mechanisms rather than one, and the audio half is the one doing the work that is hard to fake.
clip_index means two different things, and Chain only sees grouped nodes
Both the Save and Load nodes carry a `clip_index`, and the readme warns that the numbers mean what they say in two different directions. On Load it is the clip you are continuing FROM. On Save it is the clip this one IS. The first clip is Load 0, Save 1. Making clip 2 from clip 1 is Load 1, Save 2. Files follow the same obvious naming, so `clip_00002.safetensors` is clip 2.
Index 0 never reads a file. Load 0 passes the incoming conditioning through and reports `trim_frames` 0, so you can leave the node enabled for the first clip, and the instruction is explicit: do not mute it.
The buttons have one hard prerequisite and one trap. The Chain node only sees Load and Save if all three sit in the same canvas group, one of the coloured boxes drawn around nodes, and if they are not grouped together every button does nothing. Select Load, Save and Chain, then Group Selected. The trap is ComfyUI's own queue run-on-change mode: each index change is a separate graph edit, so two widgets incrementing will queue two runs and skip slots, which is why the pack ships Chain and tells you to use it instead of the Run button.
Chain is Approve on a loop. After a finished clip it bumps both indices and keeps going, so a 0/1 clip you already made becomes 1/2 rather than a re-roll, with one exception: Load 0 and Save 1 with no clip 1 on disk generates that first clip and then auto-approves. The segments field is how many clips the loop runs, where 5 means five clips then stop and 0 means keep going until you click Stop.
Clear latents, Reset, and a re-roll that overwrites in place
The file lifecycle is worth understanding before a long chain, because three of the controls touch disk.
Clear latents deletes the numbered chain slots in the Load folder, the files named `clip_00001.safetensors` and upward. Files you renamed yourself are left alone, and the indices stay where they are, so the graph still points at indices whose files no longer exist. Reset is the opposite: it sets Load 0 and Save 1, queues nothing, and deletes nothing.
Run, called Run/Re-roll in the file, queues at the current indices and does not advance them. That makes it the retry button, and the retry overwrites the slot it is aimed at. Approve advances both indices and then queues the next clip once, which is the manual version of what Chain does automatically.
One naming wrinkle catches people out. Auto-saved files, meaning Save at index 0, gain a trailing low line character, so `clip_00002_.safetensors`, because those are numbered by run rather than by clip, and indexed loading skips them on purpose. The loader can also be pointed at a specific file when `clip_index` is greater than 0, in which case the file is loaded and the index is ignored, while index 0 never reads a file.
What the readme does not cover is what happens when an index points at a missing file, or how much disk a growing chain occupies, since every clip is a full paired latent on disk in the Load folder.
Editorial conclusion
This pack suits someone already chaining MiniMax H3 clips in ComfyUI on 0.34.0 or newer who has watched colour drift accumulate through an Add Guide round trip and wants the audio to actually continue. Before wiring it, confirm three things: your ComfyUI version, since 0.3.1 is the path for anything older; that Load, Save and Chain sit inside one canvas group, because ungrouped they do nothing at all; and that you accept Clear latents deleting numbered slot files and Run overwriting a slot in place. Read the CHANGELOG alongside the tags, since three releases landed in three days.
Frequently asked questions
Why does the ComfyUI H3 Motion Context node refuse to run on my setup?
The current pack needs ComfyUI 0.34.0 or newer, which 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 runs on both. The answer is read from the layout code itself rather than from a version number, so a nightly build or a fork is handled too.
What do Load 0 and Save 1 mean in ComfyUI H3 Motion Context?
The index means different things on each node. On Load it is the clip you are continuing FROM, on Save it is the clip this one IS, so the first clip is Load 0 and Save 1, and clip 2 made from clip 1 is Load 1 and Save 2. Index 0 never reads a file: it passes the incoming conditioning through and reports trim_frames 0.
Why does the Chain button do nothing in ComfyUI H3 Motion Context?
The Chain node only sees Load and Save when all three sit in the same canvas group, and if they are not grouped every button does nothing. Select Load, Save and Chain, then Group Selected, or drop Chain into the existing Motion Context group. Also avoid ComfyUI's queue run-on-change mode, which queues two runs and skips slots when two widgets increment.
Does the ComfyUI H3 Motion Context pack modify ComfyUI?
No. Nothing on disk is edited and nothing in ComfyUI is modified. Installing means dropping the folder into ComfyUI/custom_nodes/ and restarting, after which the startup line states that ComfyUI is not modified, and the layout checks run on the first use of a Motion Context node rather than at startup.
What does Clear latents delete, and what does Reset do?
Clear latents deletes the numbered chain slots, files like clip_00001.safetensors, in the Load folder, leaves files you renamed alone, and keeps the indices where they are. Reset sets Load 0 and Save 1, queues nothing and deletes nothing. Run, or Run/Re-roll, overwrites the slot at the current indices instead of writing a new one.
What does the Seam Probe node measure in ComfyUI H3 Motion Context?
It measures whether a join is a real continuation or a convincing imitation, which is the check the rest of the pack cannot make for you. The pack exists because pinned picture frames are sliced straight out of the previous latent and the pinned audio window ends at the join, so the Probe is how you confirm the result rather than trust the wiring.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/nikodemon80-comfyui-h3-motion-context)