Nodes/IAMCCS-nodes/GUIDED AV LOOP · Window Conditioning
ComfyUI Node

GUIDED AV LOOP · Window Conditioning

Stop H3 from leaking the end of the shot into the start

By IAMCCS·Created 11 months ago·Updated about 17 hours ago· 113
GUIDED AV LOOP · Window Conditioning
  • model
  • clip
  • video_vae
  • audio_vae
  • cine_linx
  • bridge_frame
  • first_frame_override
  • last_frame_override
  • ref_image_1
  • ref_image_2
  • ref_image_3
  • ref_image_4
  • ref_video
  • ref_video_audio
  • ref_audio
  • motion_context
  • model
  • positive
  • latent
  • first_frame
  • planned_last_frame
  • reference_manifest_json
  • prompt
  • current_segment
  • total_segments
  • trim_head_frames
  • report
  • motion_state
segment_index0
render_id
prompt_override

Here's a failure mode you've probably seen without naming it: you render a long take in one latent, with several keyframes pinned across it, and the opening three seconds are already anticipating the ending. The camera drifts toward the final framing early. A character turns their head before they're supposed to. That's prompt leakage - the whole take shares one conditioning pass, so every window knows what every other window was told.

IAMCCS_MiniMaxH3MaskedLoopConditioning is the fix for the Guided AV Loop mode: it compiles one set of conditioning per technical window, so each window only sees its own framing directions. It is the mandatory partner of IAMCCS_MiniMaxH3MaskedLoopGuidedSampler - the sampler raises a hard error if it finds multiple windows and only one shared prompt.

Inputs

Required: model, clip, video_vae, audio_vae, cine_linx, segment_index.

Optional: bridge_frame, render_id, first_frame_override, last_frame_override, ref_image_1 through ref_image_4, ref_video, ref_video_audio, ref_audio, prompt_override, and motion_context.

That reference stack is the interesting part of this node. You get four still references, a reference video with its own audio, a separate audio reference, and overrides that let you replace the plan's planned opening and closing frames for this segment without re-authoring the Shotboard. That is a lot of conditioning surface for one take, which is what a masked-window sampler needs in order to hold a long loop together.

Outputs

Twelve, and they're mostly plumbing rather than results: model, positive, latent, first_frame, planned_last_frame, reference_manifest_json, prompt, current_segment, total_segments, trim_head_frames, report, and motion_state.

positive and latent go into the sampler. reference_manifest_json is the audit trail of which references were actually used - when a take looks like it ignored your reference image, that string is how you find out whether it made the cut. motion_state is the pass-through token that lets the pack's motion-context routing keep working through the loop. planned_last_frame is the destination the plan expects, which is genuinely useful on a loop: compare it against your last_frame_override before you render.

What it requires

  • Task mode guided_av_loop_experimental. The legacy longvid_masked_loop_guided is accepted for load compatibility with the original isolated graph, but the current mode is the former.
  • Exactly one validated master chunk. This is a one-master-latent execution; if the plan holds several chunks you're using the wrong engine (that's Continuous AV's job).
  • At least two matched Shotboard keyframes with frame indices. Guided AV Loop needs at least two matched Shotboard images and frame indices is the error when the plan is under-authored.

It also normalises your guides onto the master canvas, because a ComfyUI IMAGE batch can't hold mixed spatial sizes: the opener at frame 0 is stretched to fit, later anchors are centre-cropped. The log records each guide's transform, which is worth a look the first time you use a guide that was authored at a different aspect than the master.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git

Or Manager → search IAMCCS, restart. No models of its own beyond the H3 stack. The requirement that isn't obvious is the one the sampler enforces on ComfyUI itself: continuous per-row MiniMax H3 mask support (ComfyUI issue #15375). On a build without it, the loop backend refuses to run - and it refuses clearly, naming the missing feature, rather than degrading into a take with a hard seam in it.

Straight talk

This is an experimental-continuity node in a pack that labels its experimental parts as experimental. The payoff is real - per-window prompting is the difference between a long take that reads as one shot and one that reads as six shots stapled together - but you should expect to spend a run or two learning how it wants to be fed, and you should test with two or three windows before you author a long programme. The conditioning node itself is cheap and instant; all the cost is downstream in the sampler.

CategoryIAMCCS/MiniMax H3/Experimental Continuity

Inputs (19)

NameTypeDefaultDescription
modelMODEL
clipCLIP
video_vaeVAE
audio_vaeVAE
cine_linxIAMCCS_SUPERNODE_LINX
segment_indexINT00–1000000
bridge_frameoptIMAGE
render_idoptSTRING
first_frame_overrideoptIMAGE
last_frame_overrideoptIMAGE
ref_image_1optIMAGE
ref_image_2optIMAGE
ref_image_3optIMAGE
ref_image_4optIMAGE
ref_videooptIMAGE
ref_video_audiooptAUDIO
ref_audiooptAUDIO
prompt_overrideoptSTRING
motion_contextoptIAMCCS_H3_MOTION_CONTEXT

Outputs (12)

NameTypeDescription
modelMODEL
positiveCONDITIONING
latentLATENT
first_frameIMAGE
planned_last_frameIMAGE
reference_manifest_jsonSTRING
promptSTRING
current_segmentINT
total_segmentsINT
trim_head_framesINT
reportSTRING
motion_stateIAMCCS_H3_MOTION_CONTEXT