Nodes/was-node-suite-comfyui/H3 Extend Window
ComfyUI Node Runs on cloud

H3 Extend Window

Opening the next segment of a long H3 take

By WASasquatch·Created 4 years ago·Updated a day ago· 1,864
H3 Extend Window
  • latent
  • positive
  • vae
  • prompts
  • window
  • positive
  • overlap_frames
  • report
  • model
  • seed
◄continuitycarry►
◄extension_frames102►
◄overlap_frames22►
◄pass_index0►
◄drift_control0.00►
◄refresh_gain1.15►
◄audio_release8►
◄renewal0.35►
◄reference_samples4►
◄source-1►
◄live_previewtrue►
◄reference_soundtrue►
◄reencode_prompttrue►
◄sample_spansource scene►
◄seed0►

Anyone who has chained video clips by hand knows the drill: generate 81 frames, take the last frame, feed it into the next generation as an image, repeat, and watch the drift accumulate - contrast creeping up, faces slowly becoming someone else. It works, and you spend the whole project managing it. H3 Extend Window is the organised version of that loop for MiniMax H3.

It takes the clip so far and opens a window for the next segment: a latent with the clips's tail already in it, held rather than re-generated, so the sampler only has to produce what follows. Send that window to your sampler, then send the sampler's result to H3 Extend Append. Loop, and you have a long take built from short segments.

The five continuity modes

continuity is the node's whole personality, and it's the field worth reading twice.

carry is one unbroken shot. It copies the clip's last frames along with the soundtrack under them into the window and masks them, so the sampler holds them and generates only what follows. It's the default, and it's the only mode that doesn't need a VAE.

refresh does the same but softens the detail those frames gained before carrying them - the fix for a segment that comes back crunchier than the one before it. refresh_gain (default 1.15) is how much detail a pass adds, and the refresh brings the carried frames below that so the pass lands back on the opening's reading; 1.0 softens to match the opening exactly.

handoff starts the next segment on the carried frames' last frame alone - a cut that opens exactly where you were. reference hands the whole tail over as a video reference instead, which is the one for keeping a cast and a place when the scene jumps, and it wants at least 56 frames of overlap to have anything to work with.

cut, or an overlap of 0, samples a new scene from an empty latent of its own length with nothing carried at all. Clean scene change, no continuity.

refresh, handoff and reference all need vae wired; carry and cut don't.

The numbers, and the grid they live on

H3 frames sit on a 17k+5 grid - 5, 22, 39, 56 - and overlap_frames snaps down onto it, defaulting to 22. Longer overlap gives the new frames more of the scene to continue from; shorter gives the sampler more room to invent.

extension_frames (default 102, snapped down to a multiple of 17) is how many new frames this pass adds, which at 24fps is about 4.2 seconds. 17 is roughly 0.7s. You're buying these in steps of 17 whether you like it or not.

pass_index is which segment this is, from 0, and the intended wiring is a While Loop's index straight into it. Wire the same index to H3 Extend Append and the two nodes stay in step without you tracking anything.

Two optional seeds get at the same problem from different ends. drift_control takes back some of the contrast and fine detail the carried frames have gained, measured against the clip's opening frames - 0.0 carries them exactly as sampled, 1.0 takes all of it out, and it only ever softens, never sharpens. audio_release opens the held soundtrack back up over where it meets the new frames, in audio latent steps (8 is about 0.2 seconds at 40 steps/sec, 0 is a hard edge).

If you wire prompts - the bundle from MiniMax H3 Conditioning - it supplies this pass's prompt and its frame count, and extension_frames stops being read. That's the shortcut for a run whose rows you already wrote.

Outputs: window (goes to the sampler's latent input), positive (this pass's prompt, for the guider), overlap_frames (feed the same number to H3 Extend Append), and a report string stating what the pass will sample and what it snapped to. Read the report when a segment comes out the wrong length.

Installing it

Part of WAS Node Suite v3 (MIT, WASasquatch), so:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git

Or ComfyUI Manager, search WAS Node Suite v3. ComfyUI 0.14.0+, Python 3.10+, no pip packages, no bundled weights. Config, wildcard and LUT folders land in <ComfyUI user dir>/was-node-suite/ on first start, which is why that first launch is slower. The workflows folder in the repo has a working extend-loop example - docs/workflows/minimax-h3-extend-loop.json - and it's a much better starting point than wiring this blind.

The reality check

Chaining segments is still chaining segments. Overlap and drift control push the ceiling up; they don't remove it, and it's the same ceiling every chunked video tool has. Decode once, after the last segment - decoding per pass is how you end up with a stitched clip whose colour shifts at every join. And check where you stand on H3's community licence before you build on it: the open weights are geofenced out of the US, EU, UK and South Korea, and the exclusion reaches the clips you make with them.

CategoryWAS Suite/Latent/Video

Inputs (19)

NameTypeDefaultDescription
latentLATENTThe finished H3 video and audio latent this pass continues.
continuityCOMBOcarry`carry` = one shot; `refresh` = re-noised; `handoff` = cut on last frame; `reference (video)` = cut, cast kept; `reference (sample)` = cut, cast from stills; `cut` = new scene; `carry (audio only)` = cut, sound kept; `carry (audio) + reference (video)` = cut, sound and cast kept. A prompt row overrides it. References and handoff need vae.
extension_framesINT10217–3600New frames this pass adds, as `17` for about 0.7s or `102` for about 4.2s at 24 fps. Snapped to the nearest multiple of 17.
overlap_framesINT225–362Frames of the finished clip carried into the next pass, as `5`, `22` or `39`. Snapped to the nearest step of the model's 17k+5 grid, so `16` carries `22`. Longer gives the new frames more of the scene to continue from. `reference (video)` reads at least `56`; both sound carries take whole clips of sound, `17` for about 0.7s.
positiveoptCONDITIONINGPrompt for the new frames. A different prompt per pass moves the scene on.
vaeoptVAEThe H3 video VAE. Needed by `handoff` and both references.
promptsoptWAS_H3_PROMPTSEvery pass's prompt from MiniMax H3 Conditioning. Wired in, it supplies this pass's prompt and its frame count, and extension_frames is not read.
pass_indexoptINT00–24Which segment this is, from `0`. Wire a While Loop Open's index in to step through them one per iteration.
drift_controloptFLOAT0.000–1How much of the contrast and fine detail the carried frames have gained is taken back out, as `0.0` to carry them exactly as sampled, `0.5` for half or `1.0` for all of it. Measured against the clip's opening frames, and it only ever softens.
refresh_gainoptFLOAT1.151–2Fine detail a segment adds, which `handoff` softens the frame it opens on below so the pass lands back on the opening's reading. `1.15` suits most scenes, `1.0` softens to match the opening exactly. Read by `handoff`.
audio_releaseoptINT80–64Audio latent steps the held soundtrack opens back up over where it meets the new frames, as `8` for 0.2 seconds at 40 steps a second, `0` for a hard edge or `20` for half a second. Read by `carry`, `refresh` and both sound carries.
renewaloptFLOAT0.350–1Fresh noise `refresh` puts into the carried frames, as `0.0` to hold them as `carry` does, `0.35` to loosen them so the scene can evolve, or `1.0` to resample them with only the carried picture to start from. Read by `refresh`.
reference_samplesoptINT41–8Stills `reference (sample)` takes from the clip so far, spread evenly from its first frame to its last, as `4`, or `6` for a long clip with many scenes. Read by `reference (sample)`.
sourceoptINT-1-24–24Which segment this pass continues from: `-1` = the one before, `-2` = the one before that, `2` = segment 2. From an earlier segment the picture carries and the sound starts fresh; the new frames still join the clip's end. Both sound carries always read the segment before. A row's own source replaces this where prompts is wired.
live_previewoptBOOLEANtrue`true` = the Prompt Timeline draws this segment as it samples and keeps its last step, through the preview decoder in models/vae_approx whose name starts `taeh3`, as ComfyUI's own previews find theirs; `false` = no previews. Needs prompts.
reference_soundoptBOOLEANtrueOn, a clip the window references from the scene before carries that scene's sound under it, so voices and ambience follow the cast across the cut. Read by `reference (video)` and `carry (audio) + reference (video)`.
reencode_promptoptBOOLEANtrue`true` = a segment this window adds references or a handoff frame to has its prompt encoded again with them, as wired references are; one text encoder pass for that segment. `false` = they are attached as they are.
sample_spanoptCOMBOsource sceneWhere `reference (sample)` takes its stills: `source scene` = spread across the scene this segment continues from, `whole clip` = spread from the first frame to the last.
seedoptINT00–18446744073709550000The run's seed, as `42`. The seed output answers this plus the segment number, or the segment's own seed where its row names one.

Outputs (6)

NameTypeDescription
windowLATENTThe empty window to sample, for the sampler's latent input.
positiveCONDITIONINGThe prompt for this pass, for the guider that samples the window.
overlap_framesINTThe snapped overlap, for the same input on H3 Extend Append.
reportSTRINGWhat the pass will sample and what it snapped to.
modelMODELThe model this segment's row chose, from the ones wired into MiniMax H3 Conditioning, for the guider that samples the window. Blocked with a message where none is wired.
seedINTThis segment's seed, for the noise the sampler draws, as `43`.