Extensions/ComfyUI-MiniMaxH3-Contex-Loop
ComfyUI Extension

ComfyUI-MiniMaxH3-Contex-Loop

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

By ethanfel·Created 17 days ago·Updated about 19 hours ago· 315
ethanfel/ComfyUI-MiniMaxH3-Contex-Loop
Nodes68
On cloudLocal install
Categoryconditioning/minimax/contex_loop/upscale, conditioning/minimax/contex_loop/policies
Stars315
Updatedabout 19 hours ago

Nodes (68)

H3 Conditioning Sync From Latents

The node that rescales your reference images to match an upscaled H3 render

conditioning/minimax/contex_loop/upscale
MiniMax H3 Advanced Policy Override

Layer a named transition onto your H3 chain without nuking the audio plan

conditioning/minimax/contex_loop/policies
MiniMax H3 Contex Loop Assemble

Stitch your saved H3 scenes into one MP4

conditioning/minimax/contex_loop
MiniMax H3 Checkpoint Manager

Browse every take of every scene, then upscale just the branch you want

conditioning/minimax/contex_loop
MiniMax H3 Contex Loop Context

Where your previous scene's motion and audio actually get carried over

conditioning/minimax/contex_loop
MiniMax H3 Contex Loop Current Shot

Prompt, seed, length and audio window for whatever shot is rendering

conditioning/minimax/contex_loop
MiniMax H3 Chain De-Rope Continuity

Splice the previous HQ tail back in before pass 2 re-times the scene

conditioning/minimax/contex_loop/upscale
MiniMax H3 Chain De-Rope Freeze Mask

Stop pass 2 from re-texturing the frames you already locked down

conditioning/minimax/contex_loop/upscale
MiniMax H3 Chain De-Rope Guard

The guard that keeps de-roping from breaking your scene boundaries

conditioning/minimax/contex_loop/upscale
MiniMax H3 Contex Loop Export PNG Sequence

Render your whole accepted chain to a lossless PNG sequence

conditioning/minimax/contex_loop
MiniMax H3 Existing Video Context

Start an H3 chain from footage you already have

conditioning/minimax/contex_loop
MiniMax H3 Frame Gate

Opening image for scene one, nothing for the rest

conditioning/minimax/contex_loop
MiniMax H3 Frame Index Switch

Alternate end-frame targets per scene for A/B endpoint chains

conditioning/minimax/contex_loop
MiniMax H3 Full-Chain Latent Video Adapter

Feed your whole finished chain to SeedVR2 as one continuous movie

conditioning/minimax/contex_loop
MiniMax H3 Contex Loop End

Finish a shot, hand off, run the next

conditioning/minimax/contex_loop
MiniMax H3 Contex Loop Start

Start or resume an H3 chain — yes, resuming is the good part

conditioning/minimax/contex_loop
MiniMax H3 Scene LoRA Scheduler

Swap LoRA'd models per scene without ever loading one

conditioning/minimax/contex_loop
MiniMax H3 Contex Loop Load Manifest

Rebuild your manifest from disk and skip the re-render

conditioning/minimax/contex_loop
MiniMax H3 Pass-2 AV Prepare

Turn a video-only upscale into a full H3 pass-2 latent

conditioning/minimax/contex_loop/upscale
MiniMax H3 Contex Loop Plan

One definition that drives every scene in your H3 movie

conditioning/minimax/contex_loop
MiniMax H3 Plan Studio (Experimental)

Write your whole MiniMax H3 movie before H3 ever loads a weight

conditioning/minimax/contex_loop
MiniMax H3 Chain Policy

One knob for how your MiniMax H3 scenes connect — transition and audio in a single wire

conditioning/minimax/contex_loop/policies
MiniMax H3 Chain Preflight

The node that argues with your MiniMax H3 Plan before the GPU does

conditioning/minimax/contex_loop
MiniMax H3 Chain Recovered AV

Put the de-roped upscale back on the source scene's clock

conditioning/minimax/contex_loop/upscale
MiniMax H3 Contex Loop Review Gate

The pause button that turns 'rerun the whole chain' into 'fix one scene'

conditioning/minimax/contex_loop
MiniMax H3 Rich Scene Prompt Editor (Experimental)

The experimental scene editor that colors your MiniMax H3 references and can even rewrite them by AI

conditioning/minimax/contex_loop
MiniMax H3 Run Manager

Reopen a finished MiniMax H3 production and its reference media, months later, from disk

conditioning/minimax/contex_loop
MiniMax H3 Scene Prompt Editor

A proper text editor for your MiniMax H3 scene prompts, because the node-graph text box is not it

conditioning/minimax/contex_loop
MiniMax H3 Contex Loop Segment + Checkpoint

Checkpoint your MiniMax H3 scene before you're allowed to be happy with it

conditioning/minimax/contex_loop
MiniMax H3 Checkpoint Upscale Adapter

Upscale an already-checkpointed MiniMax H3 chain as a separate child run

conditioning/minimax/contex_loop/upscale
MiniMax H3 Upscale Current Scene

Lazily load one MiniMax H3 checkpoint for its upscale pass, exactly as saved

conditioning/minimax/contex_loop/upscale
MiniMax H3 Upscale Loop End

The recursive engine that walks your MiniMax H3 upscale chain, one scene at a time

conditioning/minimax/contex_loop/upscale
MiniMax H3 Upscale Merger

Stitch your upscaled MiniMax H3 scenes into one HQ MP4

conditioning/minimax/contex_loop/upscale
MiniMax H3 Upscale Reference Conditioning

Rebuild MiniMax H3's pass-2 conditioning from the checkpoint cache, no original wires needed

conditioning/minimax/contex_loop/upscale
MiniMax H3 Upscale Segment Save

Persist one upscaled MiniMax H3 scene so the rest of the chain (and a Drift-Control scene) can use it

conditioning/minimax/contex_loop/upscale
MiniMax H3 Masking · Loop Mask Slice

Slice your tracked mask to exactly the scene H3 is about to render

conditioning/minimax/contex_loop/masking
MiniMax H3 Contex Loop Seam Probe

Did your H3 clip actually continue the last one?

conditioning/minimax/contex_loop
MiniMax H3 Masking · Loop Source AV Target

Copy the real source-video interval into H3's joint target — frame-locked, sound included

conditioning/minimax/contex_loop/masking
MiniMax H3 Masking · Two-Clip AV Bridge

Generate the missing middle between two real MiniMax H3 clips

conditioning/minimax/contex_loop/masking
MiniMax H3 Masking · Apply Target Mask

Attach H3's causal video/audio denoise mask to a real AV target — the heart of inpainting

conditioning/minimax/contex_loop/masking
MiniMax H3 Masking · Grid Preview

Your H3 inpaint mask is lying to you — snap it to the real grid

conditioning/minimax/contex_loop/masking
MiniMax H3 Masking · Master Audio + Video Prefix

Lock a real soundtrack into H3 without letting denoising mangle it

conditioning/minimax/contex_loop/masking
MiniMax H3 Masking · Trim Source AV

Clip source footage to a length H3 can actually eat

conditioning/minimax/contex_loop/masking
MiniMax H3 Drift-Control Model Patch (Sigma Split)

Drift Control across a sigma split, without duplicating the model

conditioning/minimax/contex_loop
MiniMax H3 Lazy Motion AV Loader

A motion-reference loader that doesn't decode the video (until it has to)

conditioning/minimax/contex_loop/media
MiniMax H3 Lazy Motion Scene Preview

See exactly which motion window a scene will pull from

conditioning/minimax/contex_loop/references/prompt_driven
MiniMax H3 Legacy 0.4 Policy Adapter

Migrate a 0.4 Plan to 0.5 without re-deciding your audio

conditioning/minimax/contex_loop/policies/legacy
MiniMax H3 Contex Loop Trim

Cut the pinned frames off H3 output, picture and sound together

conditioning/minimax/contex_loop
MiniMax H3 Patch Priority

The placeholder node that makes sure patches don't fight

conditioning/minimax/contex_loop
MiniMax H3 Reference Video Fade (Experimental)

Dial back H3's reference video grip instead of dropping frames

conditioning/minimax/contex_loop/experimental
MiniMax H3 Reference Video Prep

Normalize any source into a clean one-pass H3 performance reference

conditioning/minimax/contex_loop
MiniMax H3 Scheduled Audio Ref

Give one scene a voiceover without renumbering every reference

conditioning/minimax/contex_loop/references/legacy_schedule
MiniMax H3 Scheduled Picture Ref

Keep one hero face per scene, without rewriting your prompts

conditioning/minimax/contex_loop/references/legacy_schedule
MiniMax H3 Scheduled Ref2VA

The scheduler that compiles your @tags into the right native labels

conditioning/minimax/contex_loop/references/legacy_schedule
MiniMax H3 Scheduled Video Ref

Schedule one performance video per scene, soundtrack included

conditioning/minimax/contex_loop/references/legacy_schedule
MiniMax H3 Semantic Anchor Bundle

Wire every semantic anchor into one socket

conditioning/minimax/contex_loop/references/semantic
MiniMax H3 Semantic Anchors (Internal)

The internal stage that rebuilds H3's Qwen presentation around your anchors

conditioning/minimax/contex_loop/references/internal
MiniMax H3 Semantic Picture Anchor

Register a story-beat image H3's Qwen can see but native slots never count

conditioning/minimax/contex_loop/references/semantic
MiniMax H3 Source Timeline

One wire to describe your whole source media, decoded only when needed

conditioning/minimax/contex_loop/media
MiniMax H3 Source Timeline Scene Preview

Check which slice of your footage a scene actually gets

conditioning/minimax/contex_loop/media
MiniMax H3 Tagged Audio Ref

H3 audio references under a stable @tag

conditioning/minimax/contex_loop/references/prompt_driven
MiniMax H3 Tagged Motion Ref

H3 motion transfer as a reusable @motion subject

conditioning/minimax/contex_loop/references/prompt_driven
MiniMax H3 Tagged Motion Ref (Lazy VIDEO/Path)

The lazy VIDEO/path variant

conditioning/minimax/contex_loop/references/prompt_driven
MiniMax H3 Tagged Motion Ref (Source Timeline)

File-backed, timeline-typed, and lazy by design

conditioning/minimax/contex_loop/references/prompt_driven
MiniMax H3 Tagged Picture Ref

The smallest node in MiniMax H3's prompt-driven reference system

conditioning/minimax/contex_loop/references/prompt_driven
MiniMax H3 Tagged Ref2VA

How @tags become native H3 references, scene by scene

conditioning/minimax/contex_loop/references/prompt_driven
MiniMax H3 Tagged Video Ref

Register a whole clip under @performance and let each scene call it when it needs it

conditioning/minimax/contex_loop/references/prompt_driven
MiniMax H3 Upscale Reference + Prompt Override

Fix the upscale pass without touching your generation graph

conditioning/minimax/contex_loop/upscale
Readme
<p align="center"> <img src="assets/minimax-h3-contex-loop.svg" alt="MiniMax H3 Contex Loop v0.5 — scene plans that survive the render" width="100%"> </p>

ComfyUI MiniMax H3 Contex Loop

Build a multi-scene MiniMax H3 video with one reusable sampling body. Review each scene, retry mistakes, resume interrupted runs, and assemble accepted scenes from disk.

Getting started · Choose a workflow · Troubleshooting · Full wiki

Version 0.5 status: main is the supported 0.5 release line. Saved 0.4 workflows and checkpoints remain supported.

Contex is the intentional public repository spelling.

What you get

| Goal | This pack provides | |---|---| | Make a longer story | A visual scene Plan drives one recursive H3 graph. | | Keep motion and sound connected | Guide and protected AV-prefix transitions. | | Direct each scene | Prompts, seeds, timing, pictures, motion video, and audio references. | | Work from existing footage | Source timelines, clip continuation, inpainting, and two-ended bridges. | | Iterate safely | Review, edit and retry, reroll, stop early, and atomic checkpoints. | | Recover the production | Resume, partial assembly, saved assets, and latent-to-PNG export. |

Quick start

From ComfyUI/custom_nodes:

git clone https://github.com/ethanfel/ComfyUI-MiniMaxH3-Contex-Loop.git

Restart ComfyUI, then:

  1. Open a maintained workflow from example_workflows/.
  2. Resolve missing model selections; models are not bundled.
  3. Give Plan a unique run_name and edit its scene prompts. Use {wide shot|close-up} for alternatives. Each scene's Prompt alternatives control can derive a stable scene seed, keep an exact fixed seed, or randomize that scene on every queue. These choices never change sampler seeds, and the exact resolved choice is saved with the checkpoint.
  4. Keep Guide and Generated audio for a simple first run.
  5. Queue the graph. Preflight checks timing, media, references, compatibility, and resume state before H3 loads.
  6. At Review Gate, approve, retry, reroll, or approve and stop. To compare several takes per scene, set its optional candidate_count above 1 (or convert it to an input and connect an INT node); Review Gate generates the candidates automatically and continues from the exact take you select.
  7. Assemble the completed or partial manifest.

Version 0.5 expects a current ComfyUI build containing native Add Guide for MiniMax H3 from ComfyUI PR #15439. ffmpeg on PATH is preferred; ComfyUI's bundled PyAV can handle review and assembly when FFmpeg is unavailable.

Some examples need bundled media copied into ComfyUI/input/. See the asset guide.

Choose a workflow

| I want to… | Start here | |---|---| | Generate from text | T2V Normal | | Animate an opening image | I2V Normal | | Move between first/last images | FL2V Normal | | Use prompt-driven pictures | Ref2V Tagged | | Guide scenes with a source soundtrack | Ref2V Studio Tagged Source Audio | | Inpaint a fixed or tracked region | Masked Video Inpaint | | Inpaint with a picture-defined replacement | Ref2V Masked Video Inpaint | | Continue one existing clip | Masked AV Extension — Single Clip | | Continue several reviewed scenes | Masked AV Extension — Chain | | Generate the gap between two clips | Two-Clip Masked AV Bridge |

Choose Normal for the standard Plan and Scene Prompt Editor. Studio workflows add an optional experimental timeline interface without changing the generation graph. The wiki workflow chooser explains every maintained example and required asset.

How it works

Chain Policy → [Advanced] → [Legacy 0.4] → Plan
Source Timeline ───────────────────────────┘
                                             ↓
                           Preflight → Loop Start → Current Shot
                                                        ↓
                                      H3 conditioning → sample → decode
                                                        ↓
                                      trim → checkpoint → review → Loop End ─↺

Loop End manifest → Assemble

Only one scene passes through the sampling body at a time. The accepted predecessor supplies continuity to the next scene; completed media and recovery metadata remain on disk.

Find help by task

| Task | Guide | |---|---| | Install and run the first scene | Getting started | | Choose Cut, Guide, Hard AV, Soft AV, or audio behavior | Continuity and audio | | Use @tags, motion references, or Source Timeline | References and source media | | Inpaint, outpaint, extend, or bridge footage | Masked editing | | Retry, resume, recover, or assemble later | Review, resume, and recovery | | Upscale a completed checkpoint branch | Runs, review, and recovery | | Diagnose a problem | Troubleshooting | | Check where a feature came from | Feature origins | | Look up Plan fields and implementation details | Advanced reference |

Repository-native references remain available under docs/ and in the complete Plan format guide.

Checkpoint Manager identifies saved takes by scene and inferred branch, previews saved media and exact video/audio dependencies, and safely deletes inactive leaves one revision at a time. Its Plan and Source Timeline pass-throughs can remain connected in generation workflows, while its selected-manifest output launches a standalone deferred upscale loop with no source Plan. Each profile is isolated under upscaled/<profile>, and saving the large HQ latent is optional. The bundled chain-aware de-rope variant combines LBH 3D with MAINodes in the same second pass, protects recursive scene boundaries, restores the prior HQ Drift-Control tail, and returns recovered video/audio to the source clock before checkpointing. For whole-video SeedVR2 finishing, Full-Chain Latent Video Adapter instead re-decodes every selected H3 checkpoint into one cached, lossless, file-backed movie. It resolves scene overlaps before upscaling and uses a temporary disk-backed VAE output buffer, so the complete production never becomes one in-memory IMAGE tensor. Tagged and Scheduled Ref2VA also cache each active scene's native reference latents and compact Qwen presentation automatically; the upscale loop restores them from the checkpoint fingerprint without original reference-media wires. See Runs, review, and recovery.

Origins and license

This project began with NikoDemon80's H3 Motion Context and grew into a separate checkpointed production-loop pack. Original, adapted, inspired, integrated, and compatibility work is mapped in Feature traceability; licenses and exact upstream revisions are recorded in Third-party notices.

GPL-3.0. See LICENSE. Contributions are covered by CONTRIBUTING.md.