MiniMax H3 Contex Loop
Recursive MiniMax H3 scene loops with motion and audio continuity, visual planning, review gates, atomic checkpoints, resume, and final video assembly.
Nodes (91)
The node that rescales your reference images to match an upscaled H3 render
Layer a named transition onto your H3 chain without nuking the audio plan
Vocals drive the lip-sync, the full mix stays the soundtrack — one node keeps them straight
Stitch your saved H3 scenes into one MP4
Redo the sound, leave the seam alone
Render a whole episode scene by scene, then ship each chapter on its own schedule
Pull one finished chapter back out of a run without dragging the whole project along
Browse every take of every scene, then upscale just the branch you want
Where your previous scene's motion and audio actually get carried over
Prompt, seed, length and audio window for whatever shot is rendering
Read the cost of your hold map before Time Smear explodes the batch
Splice the previous HQ tail back in before pass 2 re-times the scene
Stop pass 2 from re-texturing the frames you already locked down
The guard that keeps de-roping from breaking your scene boundaries
Render your whole accepted chain to a lossless PNG sequence
Start an H3 chain from footage you already have
Opening image for scene one, nothing for the rest
Alternate end-frame targets per scene for A/B endpoint chains
Feed your whole finished chain to SeedVR2 as one continuous movie
Let the model redraw your upscaled scene, not a tile grid
Finish a shot, hand off, run the next
Start or resume an H3 chain — yes, resuming is the good part
Swap LoRA'd models per scene without ever loading one
Rebuild your manifest from disk and skip the re-render
Turn a video-only upscale into a full H3 pass-2 latent
One definition that drives every scene in your H3 movie
The Plan node that runs your whole MiniMax H3 movie — now with its wires in order
Write your whole MiniMax H3 movie before H3 ever loads a weight
The node that argues with your MiniMax H3 Plan before the GPU does
Put the de-roped upscale back on the source scene's clock
The pause button that turns 'rerun the whole chain' into 'fix one scene'
The experimental scene editor that colors your MiniMax H3 references and can even rewrite them by AI
Reopen a finished MiniMax H3 production and its reference media, months later, from disk
A proper text editor for your MiniMax H3 scene prompts, because the node-graph text box is not it
Checkpoint your MiniMax H3 scene before you're allowed to be happy with it
Most of the render at half size, then finish big
Upscale an already-checkpointed MiniMax H3 chain as a separate child run
You'll never add this node by hand — and that's exactly why it matters
Lazily load one MiniMax H3 checkpoint for its upscale pass, exactly as saved
The node that eats the big frames so the next scene doesn't blow up your VRAM
The recursive engine that walks your MiniMax H3 upscale chain, one scene at a time
Reassemble a saved MiniMax H3 upscale without rendering a single frame
Second-pass upscaling conditioning that actually matches your new canvas
This node hands you the frames
Rebuild MiniMax H3's pass-2 conditioning from the checkpoint cache, no original wires needed
Persist one upscaled MiniMax H3 scene so the rest of the chain (and a Drift-Control scene) can use it
Slice your tracked mask to exactly the scene H3 is about to render
Did your H3 clip actually continue the last one?
Copy the real source-video interval into H3's joint target — frame-locked, sound included
Generate the missing middle between two real MiniMax H3 clips
Attach H3's causal video/audio denoise mask to a real AV target — the heart of inpainting
Your H3 inpaint mask is lying to you — snap it to the real grid
Lock a real soundtrack into H3 without letting denoising mangle it
Clip source footage to a length H3 can actually eat
One node where prompt-driven references meet the scene loop
The (Internal) packer you're only meeting because ComfyUI expanded a node
Drift Control across a sigma split, without duplicating the model
Two dropdowns that decide how every MiniMax H3 scene connects
See exactly which motion window a scene will pull from
Making H3 lipsync a real song instead of mumbling over it
Cut the pinned frames off H3 output, picture and sound together
The placeholder node that makes sure patches don't fight
Keep the whole candidate batch, but don't hold a job hostage
Hoard 17 pre-upscale frames so you can fix a join later
Redraw the seam, leave every other frame alone
The tiny switch whose off state is the whole point
Put the protected head back, fade the tone, touch nothing else
Stop USDU from re-inventing the frames you already generated
The path-backed asset carousel that kills a wall of H3 loader nodes
Your H3 References Need a Filing Cabinet, Not Twelve Loader Nodes
Dial back H3's reference video grip instead of dropping frames
Normalize any source into a clean one-pass H3 performance reference
Approve a waiting H3 render from any canvas on the server
The socket that changes type to hand you one scene fact
Sample at half size, then finish at full — the switch that turns it on
Four cheap low-res takes of the same H3 scene, then one expensive finish
Split the last few denoise steps so 1080p stops eating your VRAM
Wire every semantic anchor into one socket
The internal stage that rebuilds H3's Qwen presentation around your anchors
Register a story-beat image H3's Qwen can see but native slots never count
One wire to describe your whole source media, decoded only when needed
Check which slice of your footage a scene actually gets
H3 audio references under a stable @tag
H3 motion transfer as a reusable @motion subject
The lazy VIDEO/path variant
File-backed, timeline-typed, and lazy by design
The smallest node in MiniMax H3's prompt-driven reference system
How @tags become native H3 references, scene by scene
The settings bundle that tunes your tagged references in one place
Register a whole clip under @performance and let each scene call it when it needs it
Fix the upscale pass without touching your generation graph
ComfyUI MiniMax H3 Context Loop
Build a multi-scene MiniMax H3 video with one reusable sampling graph. Every scene can be reviewed, retried, checkpointed, resumed, and assembled later.
Start here · Node guide · Choose a workflow · All documentation
0.7.0: the tested nightly/RC is now the stable release on
main. See the release summary, shareable improvements table, migration notes, and validation record. Back up workflows and projects before updating. The Registry package ID retains its historicalcontex-loopspelling for compatibility.
What this pack does
- Groups full mix, vocals and instrumental tracks: vocals drive lip-sync while the full mix stays the soundtrack, with a per-scene On/Off control.
- Runs one scene at a time through the same H3 sampler body.
- Carries visual motion, generated sound, or protected source audio between scenes according to a simple Generation Profile.
- Saves each accepted take to disk, so a stopped or failed run can resume. See cancellation and scene-level resume for DeRoPE/upscale checkpoints and recoverable VIDEO PNG publication.
- Provides scene review, alternate takes, branch management, final assembly, masked editing, and deferred upscaling.
- Captures a frame from a saved Review Gate preview into the Project Asset Carousel as a new tagged picture, without replacing the original take.
Models are not included.
Context Loop execution and recovery
- Context brush. In Plan Studio → Context → Picture, use Weaken context… to paint fixed regions that may change more under AV Mask. Usage and limits.
- Optional top-level requeue. Examples use recursive execution by default. For a separate prompt boundary between accepted scenes, enable top-level requeue in Loop End and ComfyUI settings. See execution modes for setup and limits.
- Reference propagation fix. Valid prompt
@tagsagain see the connected Tagged registry during preflight without rewriting prompt text or storing reference data in the Plan. - Crash-safe review and resume. Review snapshots stay visible after a refresh or restart, and durable handoffs/manual resume keep the same Plan semantics while avoiding duplicate queues.
- Migration guidance. The original Plan remains supported. Removed legacy nodes and controls are listed in the 0.7 migration guide.
Install
From ComfyUI/custom_nodes:
git clone https://github.com/seitanism/ComfyUI-H3-Motion-Context-MultiRef.git
git clone --branch main \
https://github.com/ethanfel/ComfyUI-MiniMaxH3-Context-Loop.git
Restart ComfyUI after cloning or updating either pack. A current ComfyUI build
with native Add Guide for MiniMax H3 support is recommended. ffmpeg on
PATH gives the best review and assembly support; ComfyUI's PyAV is used as a
fallback where supported.
The MultiRef pack provides the maintained public Motion Context node. Context Loop uses it automatically for compatible Guide scenes and keeps its own specialized fallback for loop-only modes.
Make your first video
- Open T2V Normal in ComfyUI.
- Select the H3 diffusion model, text encoder, video VAE, and audio VAE.
- In Plan, give the run a unique
run_nameand edit the scene prompts. - Keep the workflow's default visual continuity and generated-audio settings.
- Queue the workflow. Preflight checks the plan before the models load.
- At Review Gate, choose Approve & continue, Retry, Reroll seed, or Approve & stop.
- The active Assemble node writes the final MP4 after the last scene.
To extend a running Plan, append scenes before approving its last scene. With
Loop Start's scene_range left blank, Approve & continue finishes the current
run, then queues the updated workflow at the first appended scene using the
saved checkpoint. Keep that workflow and branch open until it queues. Explicit
scene ranges and Approve & stop do not automatically extend the run.
To reuse a still as a reference, scrub the saved Review Gate preview, click
Capture frame…, check the destination project and tag, then Save to
Carousel. Reusing a tag creates a numbered take. Capture requires ffmpeg
and follows the destination project's workflow-ownership rules.
For a screen-by-screen explanation, expected output paths, and common first-run problems, use the Getting started guide.
For disposable batch renders, Assemble has an opt-in
delete_checkpoints_after_assembly
setting. It frees checkpoint space only after a completed export. Leave it off
if you need resume, latent upscale, or checkpoint-based reassembly later.
Choose a workflow
| I want to… | Open this workflow | |---|---| | Start simply with reference pictures | Ref2V Basic — direct image loaders | | Manage project references, scenes and optional source audio | Carousel / Studio | | Generate from text | T2V Normal | | Animate an opening image | I2V Normal | | Move from a first image to a last image | FL2V Normal | | Inpaint part of a video | Masked Video Inpaint | | Continue an existing clip | Masked AV Extension — Single Clip | | Continue a reviewed chain | Masked AV Extension — Chain | | Generate the gap between two clips | Two-Clip Masked AV Bridge | | Upscale a saved run | Deferred upscale workflows |
Prefer explicit reference-loader wiring? The manual Tagged examples are available separately. For SelfLift, use the Seed Hunt example with review enabled or disabled.
The 0.7 release uses the maintained 0.6-named workflow catalog, rebuilt for this checkout's nodes. Choose Normal for Production Plan and Scene Prompt Editor. Studio adds Plan Studio, Project Asset Carousel, the rich prompt editor, and Checkpoint Manager; it does not change the generation graph. Pre-0.6 examples were retired in 0.7 and remain available in Git history. See 0.7 migration notes.
How the graph is organized
<p align="center"> <img src="assets/workflow-overview.svg" alt="Context Loop node flow with active generation nodes and a muted recovery branch" width="100%"> </p>Only the current scene enters the sampling body. Loop End either starts the next scene or emits a manifest for Assemble.
The supplied generation workflows also contain a muted recovery branch:
- Muted nodes are present but do not execute. The grey dashed Load Manifest → Assemble later pair is intentionally muted during normal runs.
- Bypassed nodes pass a compatible input through without applying their normal operation. Some optional attention nodes in upscale examples ship bypassed intentionally.
- To assemble an existing run without rendering, unmute the recovery pair and queue its Assemble node. No sampler graph needs to run.
The diagrams use the same idea as a disabled-pack node preview: sockets remain visible so you can understand the wiring even when the node does not execute. See How disabled nodes are shown.
Core nodes
| Node | Main input | Main output | Use it for |
|---|---|---|---|
| Generation Profile | Continuity and audio choices | chain_policy | Choose normal behavior in two controls. |
| Plan (Modern) | Scene prompts, organized settings, required policy | plan | Define the production without legacy fallback controls. The original Plan remains available for existing workflows. |
| Preflight | plan | checked plan, ready, status | Catch problems before model loading. |
| Loop Start | checked plan | flow, state | Start or resume a run. |
| Current Shot | state | prompt, seed, timing, size | Drive the current scene. |
| Chain Context | state, conditioning, VAE, latent | conditioned latent and trim count | Add the selected continuity. |
| Segment + Checkpoint | state, frames, sampled latent | segment | Save a take and its resume state. |
| Pending Review | one defer toggle | pending_review | Optionally store a complete candidate batch for later review without leaving an execution waiting. |
| Review Gate | state and saved segment | reviewed segment | Approve, retry, reroll, or stop. |
| Loop End | flow, state, frames, latent, segment | manifest | Advance or finish the loop. |
| Chapter Delivery | manifest and Export current chapter toggle | scoped manifest | On exports the chapter containing the last generated scene, including unfinished chapters. Off exports everything in the incoming manifest. Automatically follows new chapters. Review Gate's Approve & Stop partial export follows the connected toggle too. |
| Assemble | manifest | video_path | Build the final MP4. |
The Node guide lists the important sockets, settings, reference nodes, recovery tools, masking nodes, and advanced groups.
Dialogue audio for one scene
In Plan Studio, select a scene and choose Lip-sync source · this scene only. Pick an audio file from the Project Asset Carousel (use Refresh audio after importing it). This turns that scene's Lip-sync on. The file can remain disabled for prompt tags; it does not need to become the project's Source track.
Audio file start selects the position heard at the first delivered frame, snapped to 1/24 second. AV context remains before that position. Short audio is padded with silence and longer audio is cut to the scene; scene timing and other scenes' sources do not change. Editorial trims/slips move dialogue with the picture.
With a Source final soundtrack, choose dialogue over the project track (default) or replace the track during this scene. Generated output uses the dialogue once; None remains muted. Source, offset and mix choice are saved with the generated take and retained for checkpoint recovery, chapter delivery and upscale export. Keep the carousel audio file: saved exports reference that original asset. The player previews the current Plan selection through its Source track / scene dialogue monitor; regenerate the scene after changing its dialogue source. Choose Inherit project timeline to return to the existing source behavior. Existing workflows without a scene source keep their previous behavior.
Important behavior
- Collapsible Studio chapters. Use ▾ beside a chapter title to fold its scenes into a compact group. Click the group to play/scrub the chapter on a local timeline, including trims, ALTs and internal black gaps. Folding is saved with the workflow and does not alter generation or exports. See chapter folding and playback.
- Chapter resolution. Click a chapter marker in Plan Studio, then choose Inherit from Plan or set its Width / Height (multiples of 32). Connect Current Shot width/height to the H3 conditioning node. A locked saved scene pins its entire chapter to its original size; changing the Plan default can then affect Chapter 2 without changing Chapter 1. Unlock the saved scenes before explicitly changing their chapter's size. Existing media is not resized. Native AV/latent video context cannot cross different sizes: use zero video context at that boundary. Export different-sized chapters separately through Chapter Delivery; mixed-resolution whole-run assembly is rejected.
run_nameidentifies a production and its checkpoint history. Use a new name for a new production; keep it unchanged to resume.- Preflight rejects incompatible resume state instead of mixing checkpoints produced with different generation inputs.
- Accepted scene media, manifests, and recovery data live under
ComfyUI/output/h3_chains/<run_name>/. - Uploaded project assets live under
ComfyUI/input/h3_projects/<run_name>/and are mirrored into the run for recovery. - Browser-driven asset imports are confined to media listed from ComfyUI input, another project, or an H3 recovery backup. Move other server files into the configured ComfyUI input directory before importing them.
- Direct prompt optimization allows OpenAI, Gemini, and OpenRouter by default.
A server operator can add exact provider origins, including a local API,
before startup with a comma-separated
H3_PROMPT_OPTIMIZER_ALLOWED_ORIGINSvalue such ashttp://127.0.0.1:1234,https://api.example.com. - New projects put scene MP4s in
generation/clips/and assembled videos inexports/videos/<scope>/. Existing projects keep their original paths, includingfinal/. Assemble can also copy to the regular ComfyUI output folder. See simple layout and optional copy conversion. - The exact saved checkpoint supplies the next scene's continuity. Preview or assembly filters never rewrite that checkpoint.
- Plan Studio can render a picture-only Alternate final-cut take without changing downstream scene ancestry or audio. See Runs and recovery.
Documentation
| Task | Guide | |---|---| | Install and render the first scene | Getting started | | Understand nodes and sockets | Node guide | | Pick an example | Workflow catalog | | Manage a project's media library | Project Asset Carousel | | Write scenes and prompts | Scene authoring | | Choose visual/audio continuity | Audio and continuity | | Use tagged references | Tagged references | | Retry, resume, recover, or assemble | Runs and recovery | | Inpaint, outpaint, extend, or bridge | Masked editing | | Check runtime compatibility | Compatibility |
Advanced implementation, migration, provenance, and research references are listed in the documentation index.
Origins and license
This project began with NikoDemon80's H3 Motion Context and grew into a separate checkpointed production-loop pack. Feature origins are mapped in Feature traceability; exact upstream revisions and licenses are in Third-party notices.
GPL-3.0. See LICENSE. Contributions are covered by CONTRIBUTING.md.