APNext H3 Scenes → Contex Loop Plan
Real continuity across scenes, via Contex Loop
- plan_json
- shot_count
Stitching rendered clips into one file is one thing; making scene N+1 know what scene N ended with is another. If you want a character to walk out of frame at the end of one scene and the next scene to open on exactly that last frame, you need the frames (and audio) of the previous clip carried into the next render. That's the job of ComfyUI-MiniMaxH3-Contex-Loop by ethanfel - and APNext H3 Scenes → Contex Loop Plan is the bridge that feeds it.
The node converts the scenes / durations lists from an H3 Crossover or Scenes Writer into the plan JSON that Contex Loop's MiniMax H3 Contex Loop Plan node accepts on its plan_json_input socket: a shots[] array where every shot carries id, prompt, duration_seconds and seed, plus an optional prompt_prefix and a defaults.steps. Contex Loop then renders every scene in order, using the previous scene's tail as motion and audio context for the next - one continuous take instead of a string of hard cuts. The pack's h3_crossover_contex_chain.json example is exactly this: a Crossover Writer in continuous-chain mode feeding scenes/durations into this node, into the Contex Loop plan.
The inputs that matter
scenes- the list from a Crossover / Scenes Writer. This is the payload; everything else is framing.id_prefix- shot ids becomescene_01,scene_02, … These double as checkpoint names in the Contex Loop pack, so a prefix that describes the run helps when a batch resumes mid-way.base_seedandseed_mode- shot 1 usesbase_seed, each later shot usesbase_seed + index. Theomitmode leaves seeds out entirely and lets the Plan node derive them. If you want a reproducible run, keep the incrementing mode; if you want variety per shot, omit.steps- sampler steps written intodefaults. 0 means "leave it to the Plan node," which is the sensible default unless you have a reason to pin it.durations(optional) - the matching list, written asduration_secondsper shot. Without it Contex Loop has no per-shot length.prompt_prefix(optional) - global continuity text the Plan node prepends to every scene. Good for a line like "the camera stays on the same continuous shot throughout" that should apply to all of them.
Outputs: plan_json (the JSON string) and shot_count (how many shots made it in) - the first for the Contex Loop socket, the second for a sanity check.
Installing - and the real gotcha
You need two packs for this. Install this one (ComfyUI Manager → comfyui_dagthomas, or clone + pip install -r requirements.txt), and ComfyUI-MiniMaxH3-Contex-Loop from https://github.com/ethanfel/ComfyUI-MiniMaxH3-Contex-Loop, or the MiniMax H3 Contex Loop Plan socket you're aiming at won't exist. People forget this one because every other H3 node is self-contained.
Alternatives, in case Contex Loop feels like too much machinery: the core MiniMaxH3AddGuide node, ComfyUI-H3-Motion-Context, or this pack's own H3 Claude Code Continue Writer, which does last-frame → I2VA-first-frame chaining one clip at a time. If you're doing a handful of scenes, the Continue Writer is simpler; if you're rendering a whole story in one queue, this is the one.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| scenes | STRING | The `scenes` list from an H3 Crossover / Scenes Writer. | |
| id_prefix | STRING | scene | Shot ids become `<id_prefix>_01`, `_02`, ... (checkpoint names). |
| base_seed | INT | 00–18446744073709550000 | Seed for shot 1; each later shot uses base_seed + index. -1 in seed_mode omits seeds. |
| seed_mode | COMBO | base_seed + index | 2 options: base_seed + index, omit (plan node derives seeds) |
| steps | INT | 00–10000 | Sampler steps written into defaults. 0 = leave to the Plan node. |
| durationsopt | FLOAT | The matching `durations` list; written as duration_seconds per shot. | |
| prompt_prefixopt | STRING | Global continuity text prepended to every scene by the Plan node. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| plan_json | STRING | — |
| shot_count | INT | — |