APNext H3 Sampler + Save Clip (each scene to disk as it finishes)
Watch your clips hit disk before the run is even done
- noise
- guider
- sampler
- sigmas
- latent_image
- vae
- audio
- output
- file_path
If you've ever rendered a 20-scene music video and lost everything to a crash at scene 19, you already know why this node exists. H3SampleAndSave is SamplerCustomAdvanced and Save Clip welded into one node that processes scene by scene: each one is sampled, decoded, muxed with its audio slice and written to disk before the next scene starts sampling. The output folder fills up while the run is still going, and a crash late in the run keeps everything already saved.
Why the separate nodes fail you
ComfyUI maps a list over each node before moving to the next. So with a writer's 20 scenes wired in, SamplerCustomAdvanced renders all 20 latents first, then Save Clip starts decoding - nothing reaches disk until the last scene has sampled. It's not just a crash-safety problem; it also means a 20-scene video holds the memory pressure of the whole run. This node does what the pack's Chain Render already did for the chained path, but for the ordinary sampler path: one node, per scene, sample → decode → mux → save.
Inputs
It takes the sampler's inputs and Save Clip's inputs, so it drops in exactly where SamplerCustomAdvanced → H3 Save Clip used to be:
noise,guider,sampler,sigmas- the sampler rig: Random Noise (the seed), Basic Guider (model + the scene's conditioning), KSampler Select, Basic Scheduler.latent_image- the scene's starting latent (Reference To Video's LATENT, or the Song Masked AV Context's). With a list of scenes wired in, the node runs once per scene.vae- the MiniMax H3 video VAE, used to decode the clip.filename_prefix(defaultvideo/H3) - where clips go under the output directory. Wire a writer'sproject_nameoutput here so every run lands in its own folder.fps(24) - H3 renders at 24 fps.format-mp4/mkvuse H.264,webmuses AV1.
Optional: audio - the clip's soundtrack. Wire the writer's audio_segments list so each scene is muxed with its own slice of the song; empty means silent clips. And wav_sidecar (on) - writes each clip's audio as a WAV next to the video, same name.
Why the WAV sidecar exists
That wav_sidecar flag is easy to skip, and it's worth understanding. AAC inside an mp4 leaves a 2–14 ms hole at every butt-join when you stitch clips, because of encoder priming and padding. The WAVs are sample-exact. So if you're assembling a multi-scene video by hand in an editor, lay the WAVs under the clips and the joins are gapless. The pack's own H3StitchClips doesn't need them - it decodes and re-encodes properly - but this is the manual-editor escape hatch.
Outputs
output- the sampled latent, exactly what SamplerCustomAdvanced'soutputwould have been. Anything that used to hang off the sampler (a latent upscaler, a VAE Decode Audio branch) still can.file_path- the clip that was just written. Collect these into the stitch node at the end.
Installing
Part of the dagthomas pack - ComfyUI Manager, search "comfyui_dagthomas", install, restart:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
No extra dependencies - it's built on ComfyUI's own sampler and save machinery. The one thing to keep in mind is that it's an output node by design: it saves as it goes, so don't expect to preview the joined result here. That's what the stitch node is for. If you've been running multi-scene renders with a single big sampler, swapping this in is the single cheapest reliability upgrade you can make to the graph.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| noise | NOISE | Random Noise (the seed). | |
| guider | GUIDER | Basic Guider (model + the scene's conditioning). | |
| sampler | SAMPLER | KSampler Select. | |
| sigmas | SIGMAS | Basic Scheduler. | |
| latent_image | LATENT | The scene's starting latent - Reference To Video's LATENT, or the Song Masked AV Context's. With a list of scenes wired in, this node runs once per scene. | |
| vae | VAE | The MiniMax H3 video VAE - the clip is decoded here. | |
| filename_prefix | STRING | video/H3 | Where the clips go under the output directory - wire a writer's `project_name` output here so every run lands in its own folder. |
| fps | FLOAT | 241–120 | H3 renders at 24 fps. |
| format | COMBO | mp4/mkv use H.264, webm uses AV1. | |
| audioopt | AUDIO | This clip's soundtrack - the writer's `audio_segments` list, so each scene is muxed with its own slice of the song. Empty = silent clips. | |
| wav_sidecaropt | BOOLEAN | true | Also write each clip's audio as a WAV next to its video file (same name). For MANUAL assembly in an editor: AAC in mp4 leaves a 2-14 ms hole at every butt-join (encoder priming/padding), while the WAVs are sample-exact - lay them under the clips and the joins are gapless. H3 Stitch Clips does not need them. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output | LATENT | The sampled latent, exactly what SamplerCustomAdvanced's `output` would be - for VAE Decode Audio, a latent upscaler, or anything else that used to hang off the sampler. |
| file_path | STRING | The clip that was just written. |