Viggle Assemble Chunk Latents
Stitches your saved Viggle chunks into one latent for the final decode
- chunks
- video_latent
- status
Viggle Assemble Chunk Latents is the finishing node for the disk-checkpoint loop in ComfyUI-Viggle-Animate-H3. The loop's whole design is that each chunk gets sampled, checkpointed to disk and individually decoded as a preview - but those previews each contain overlap context, so they're not the final video. This node loads the saved chunks, trims the overlaps so each later window only contributes its new frames, and splices them into one master latent for a single final VAE Decode. It's the difference between a pile of overlapping previews and an actual finished clip.
And here's the quietly useful part: it doesn't need the loop to have just run. Because everything lives on disk under a run name, this node can assemble an interrupted or even closed run - feed it a run_name and it reads the saved manifest, including a run that crashed mid-way. That makes it the recovery tool as much as the finisher.
The context if you're new to the pack: Viggle-Animate is a 33B finetune of MiniMax-H3's ref2va for character replacement in video. The loop - Start, Sample Chunk, Loop End - renders a long driving clip in ~124-frame windows, saving each latent checkpoint to output/viggle_chunks/<run_name>/ before its decode. This node is the last piece.
Inputs
chunks(optional) - from Viggle Chunk Loop End'schunksoutput. Leave it unconnected and the node reads from disk instead, usingrun_name.run_name- used whenchunksisn't connected. It loadsoutput/viggle_chunks/<run_name>/manifest.json- including interrupted runs, so you can assemble whatever completed before a crash.chunk_number-0assembles all completed chunks (the normal final-video path). A positive number loads exactly that one chunk - overlap included - for inspection or a single-chunk decode.
Outputs
video_latent(LATENT) - the assembled master latent. Feed it to one final VAE Decode and save. It can report Partial if a run was interrupted - you get frames up to the last fully checkpointed chunk, not a silent truncation.status(STRING) - a plain-text report: "Complete/Partial: N chunks, F frames. Decode once for the final video," or details of the single chunk you asked for.
How it works
Assembly is a validation pass as much as a stitch. Each saved checkpoint carries a fingerprint that chains to its predecessor, so the node verifies the checkpoints form a continuous, matching chain - a gap or a mismatched take is an error rather than a silent substitution. It then lays each chunk's latent into the master at its frame offset, keeping only each window's contribution beyond the overlap. Expect the "Complete" status on a healthy run and "Partial" if you're recovering something.
Installing it
It's one of six nodes in the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Saganaki22/ComfyUI-Viggle-Animate-H3
or install ComfyUI-Viggle-Animate-H3 via ComfyUI Manager, restart ComfyUI and refresh the browser. No pip requirements - it needs current ComfyUI with MiniMax-H3 support, and the run folder has to exist (it's created by Viggle Chunk Loop Start; the Assemble node only reads). If you're recovering a run, the cleanest path is: disconnect chunks, type the run_name, leave chunk_number = 0, and connect video_latent to a VAE Decode. One caveat from the pack's own docs: assembly still needs the full latent and a full decode in memory, so it's not the step that shrinks your RAM budget - it's just the step that turns your checkpointed chunks into a finished, seamless-enough video.
Two practical notes. First, if you want to inspect one window before committing to the full assembly, a positive chunk_number is cheaper than assembling everything - its status tells you exactly which frames it covers. Second, don't concatenate the per-chunk preview videos to fake the final result; the previews overlap, which is why this node exists in the first place. Save the assembled latent's decode at 24 fps and mux in your driving clip's audio - the model's own generated audio is discarded.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| run_name | STRING | viggle_take_01 | Used when chunks is not connected; loads the saved manifest, including interrupted runs. |
| chunk_number | INT | 00–100000 | 0 assembles all completed chunks. A positive number loads that one chunk for inspection. |
| chunksopt | VIGGLE_CHUNKS | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| video_latent | LATENT | — |
| status | STRING | — |