Nodes/SDXL Auto Prompter/APNext H3 Short Film Chain Render (carry picture + sound between scenes)
ComfyUI Node

APNext H3 Short Film Chain Render (carry picture + sound between scenes)

APNext H3 Short Film Chain Render

By dagthomas·Created 3 years ago·Updated about 23 hours ago· 289
APNext H3 Short Film Chain Render (carry picture + sound between scenes)
  • model
  • clip
  • vae
  • audio_vae
  • sampler
  • sigmas
  • ref_image_1
  • ref_image_2
  • ref_image_3
  • ref_image_4
  • file_paths
  • report
  • audio
scenes
lengths
width1344
height768
seed0
context_frames39
audio_feather_ticks8
continuityflow everywhere (every scene continues the previous picture and sound)
filename_prefixvideo/H3_film
fps24.00
save_latentstrue
seam_crossfade_ms400
context_modemasked AV latent (picture + sound; 39 / 90 / 141 frames)

A music video has a master track - the song - so the APNext Music Video Chain Render can pin the audio for you. A short film has no master track. Its sound is the previous clip's sound: the room tone, the score, whatever was mid-air at the cut. Render scenes as independent clips (which is what plain list processing does) and every scene change is a sound edit the film never asked for - the hum restarts, the music stops, the silence resets.

H3ShortFilmChainRender fixes exactly that. It renders the writer's scenes one after another inside one execution and, for every scene after the first, pins the last context_frames of the previous scene's sampled latent - picture and sound together - to the head of the new latent, protected by a noise mask. The model reads that pinned run as "this clip's picture and sound so far" and continues both. No decode/re-encode round trip: the latent is copied straight across, so nothing is lost at each link. The delivered clip has the pinned head trimmed off, picture and sound by the same duration.

It's a dagthomas/comfyui_dagthomas node, built for the same pack's APNext H3 Short Film Writer - pair it with the writer's continuity_mode = Continuous chain, which opens every scene on the previous ending and keeps objects, positions and light consistent across the join, so the words and the pixels agree.

How it works - the three carry modes

context_mode picks how the previous scene reaches the next:

  • Masked AV latent (default) - both streams copied into the new latent under a noise mask. The surest carry, but the 24 fps picture grid and the 40 Hz audio grid only share a boundary every 51 frames, so it can only pin 39 / 90 / 141 frames. The audio mask is feathered over its last ticks (audio_feather_ticks, default 8 = 0.2 s) so the join is a release, not a wall.
  • Motion context guide - the previous frames pinned as never-denoised conditioning at any H3 run (5, 22, 39, 56…), with the tail of the previous sound pinned on the same timeline from the saved latent. More flexible lengths, sound still continues.
  • Core guide clip - picture only, no extra pack needed; sound is generated per scene.

Then there's seam_crossfade_ms (default 400). The audio output is one continuous track for the whole film - at every join where the take continues, the previous scene's tail and the new scene's re-rendering of it are blended with an equal-power crossfade. No splice, no click, no level jump, and the total length is unchanged; hard cuts get a 5 ms declick. Wire that audio into a Scenes Join's replace_audio (or Save Audio) and you get a single film file, not a folder of clips.

The inputs that matter

  • model / clip / vae / audio_vae - the H3 loaders; audio_vae decodes each scene's sound.
  • scenes, lengths - the Short Film Writer's lists.
  • context_frames - how much of the previous scene is pinned (default 39 ≈ 1.6 s). More context = longer, surer continuation, and fewer frames left for the scene.
  • continuity - "flow everywhere" (every scene continues picture and sound) or "cut everywhere" (independent clips, render as before).
  • ref_image_1..4 - reference pictures, same for every scene.
  • save_latents - on by default; writes each scene's sampled latent to output/apnext_latents/ so H3 Scene Retake can later re-render one scene from the real tail. ~10–30 MB per scene.

Outputs: file_paths (the clips), report, and the audio track above.

Install

Same pack install as the rest of this family:

cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt

Then restart ComfyUI (Manager search "comfyui_dagthomas" also works). For the masked AV latent mode, install ComfyUI-H3-Motion-Context-MultiRef; without it the node falls back to the core guide and says so in the report. The H3 weights load via ComfyUI's own MiniMax H3 nodes - the ~40 GB download, with a community license that excludes the US, EU, UK and Korea, is a separate question from this pack but worth knowing before you build a film around it.

Troubleshooting

If the report says the carry was the core guide and you expected masked AV, the Motion-Context pack is missing - install it. If a scene feels like the model is "ignoring" the pinned sound, raise context_frames to 90 or 141 (more of the previous audio is inherited) or bump audio_feather_ticks slightly so the release is gentler. And if you only need to redo one scene of a finished film, don't re-run the whole chain - use H3 Scene Retake.

Categorycomfyui_dagthomas/H3

Inputs (23)

NameTypeDefaultDescription
modelMODELThe H3 model, with whatever attention / SoL patches you use.
clipCLIP
vaeVAEH3 video VAE.
audio_vaeVAEH3 audio VAE - decodes each scene's sound.
scenesSTRINGThe Short Film Writer's `scenes` list.
lengthsINTThe writer's `lengths` list (frames per scene).
widthINT134432–8192
heightINT76832–8192
samplerSAMPLER
sigmasSIGMAS
seedINT00–18446744073709550000Scene k samples with seed + k.
context_framesINT395–141How much of the previous scene is pinned to the head of the next one, in frames (24 fps). Snapped to what context_mode can pin: the masked AV latent takes the runs where picture and sound share a boundary - 39 (~1.6 s), 90 (~3.75 s), 141 (~5.9 s); the guide modes take any H3 run - 5, 22, 39, 56, 73, 90, 107, 124, 141. More context = a longer, surer continuation, and fewer frames left for the scene.
audio_feather_ticksINT80–64Half-cosine release over the last ticks of the pinned audio (40 ticks = 1 s). 0 = hard mask. 8 = 0.2 s: the model may bend the very end of the inherited sound into what it generates next, which hides the seam.
continuityCOMBOflow everywhere (every scene continues the previous picture and sound)2 options: flow everywhere (every scene continues the previous picture and sound), cut everywhere (independent clips - render as before)
filename_prefixSTRINGvideo/H3_film
fpsFLOAT24.001–60
ref_image_1optIMAGEReference picture <Picture 1> for every scene (Ref2VA).
ref_image_2optIMAGEReference picture <Picture 2> for every scene (Ref2VA).
ref_image_3optIMAGEReference picture <Picture 3> for every scene (Ref2VA).
ref_image_4optIMAGEReference picture <Picture 4> for every scene (Ref2VA).
save_latentsoptBOOLEANtrueWrite every scene's sampled latent to output/apnext_latents/<project>_sNN.pt so H3 Scene Retake can render one scene again later, continuing from the previous scene's real tail - picture and sound. ~10-30 MB per scene.
seam_crossfade_msoptINT4000–1500The `audio` output is ONE continuous track for the whole film. At every join where the take continues, the previous scene's tail and the new scene's second take of it (its pinned head) are blended with an equal-power crossfade this long - no splice, no click, no level jump, and the total length is unchanged. Hard cuts get a 5 ms declick. Wire `audio` into Scenes Join's `replace_audio` (or Save Audio); it is also written as <prefix>_audio.wav next to the clips.
context_modeoptCOMBOmasked AV latent (picture + sound; 39 / 90 / 141 frames)How the previous scene reaches the next. Masked AV latent: both streams copied into the new latent under a noise mask - the surest carry, but only 39 / 90 / 141 frames. Motion context guide: the previous frames pinned as never-denoised conditioning (any H3 run) with the tail of the previous sound pinned on the same timeline from the saved latent. Core guide clip: picture only, no pack needed.

Outputs (3)

NameTypeDescription
file_pathsSTRING
reportSTRING
audioAUDIO