Nodes/ComfyUI-Viggle-Animate-H3/Viggle Chunked Sampler
ComfyUI Node

Viggle Chunked Sampler

One node that renders the whole long clip, chunk by chunk, then hands you the video

By Saganaki22·Created 4 days ago·Updated about 21 hours ago· 71
Viggle Chunked Sampler
  • guider
  • sampler
  • sigmas
  • cond_set
  • vae
  • frames
  • chunk_map
seed0
rerender_chunk0
rerender_seed0

If you've got the pack's Windowed Conditioning node feeding a driving clip that's longer than one 124-frame chunk, this is the node that actually renders it. Viggle Chunked Sampler is the "single-pass" path in ComfyUI-Viggle-Animate-H3: it takes the per-chunk conditioning from the windowed node, samples every window inside one node, carries each chunk's tail into the next, assembles everything, decodes once, and spits out finished frames. Two Viggle nodes in, video out the end. The alternative is the four-node disk-checkpoint loop, which you'd pick when a run is expensive enough that losing it hurts; this one is the compact default.

Viggle-Animate, in case you need the framing: it's a 33B finetune of MiniMax-H3's ref2va that does character replacement in video - motion, camera and lighting come from a driving clip, identity from one reference still. No text encoder, no prompt, and the sampler is DMD2-distilled, so it wants very few steps (4–8; 6 is the usual sweet spot).

How it works

Each chunk renders at exactly the trained 124-frame length. The continuity trick is latent carry: chunk N's first overlap_frames aren't regenerated from noise - they're pinned to chunk N−1's output via a per-row denoise mask, so the model sees carried rows as near-clean context and only invents the new frames. Because of that, chunks are chained: rerender chunk 3 and everything after it has to resample too, since each receives content from its predecessor.

The node generates standard noise internally from its seed - chunk i uses seed + i, so chunks vary independently while the whole run stays reproducible. There's a bounded in-memory cache (2 GiB of CPU tensors) keyed on a fingerprint of the sampling stack and the whole chunk chain, so earlier chunks can be served from cache instead of resampled. Note the word memory: restart ComfyUI and the cache is gone.

Inputs worth setting

  • cond_set - from Viggle-Animate Conditioning (H3, Windowed). Don't connect it to the plain single-shot conditioning node; it expects the windowed one's plan.
  • guider / sampler / sigmas - your usual SamplerCustomAdvanced-style stack. BasicGuider (or CFGGuider) plus a KSamplerSelect plus a sigma schedule. The guider's positive is swapped per chunk from the cond_set, so only its model, cfg and negative matter.
  • vae - the MiniMax-H3 video VAE, used for that one final decode.
  • seed - base seed. Leave it fixed between runs you want to reproduce.
  • rerender_chunk (1-based) + rerender_seed - pick one troublesome chunk (the chunk_map output lists numbers) and give it another seed. rerender_chunk = 0 disables the override. Chunks before it reuse cache; it and everything after resample.

Outputs

frames (IMAGE) is your finished clip - decoded once, wire it straight to a video-saving node. chunk_map (STRING) is the report: frame ranges, timestamps, effective seed per chunk, overlap, and [cached]/[rendered] labels. Feed it to Show Text if you want to read it.

Install and the sigma gotcha

It ships in the ComfyUI-Viggle-Animate-H3 pack, so it's the usual:

cd ComfyUI/custom_nodes
git clone https://github.com/Saganaki22/ComfyUI-Viggle-Animate-H3

or install via ComfyUI Manager, then restart and refresh the browser. No pip requirements - but you need an up-to-date ComfyUI with MiniMax-H3 support, plus the model files: the ref2va diffusion model (pruned int8 is ~21 GB), the DMD LoRA, the frozen fixed_embed_fwd_anyframe text conditioning in models/text_cond/, and the H3 video VAE.

Where people get burned: the sigma schedule. This sampler validates it up front and throws an actionable error before rendering if it's wrong, but don't let it get there. The distilled schedule is 1.0, 0.8571428571428571, 0.6, 0.0 in ManualSigmas - four sigma points including the final zero, which means only three model forward passes. The schedule must end in exactly one 0.0, and with KJNodes CustomSigmas set interpolate_to_steps to 3, not 4 - interpolating through log(0) produces a 0, 0 tail that makes Euler return NaNs and turns your video black (or, pre-fix, contaminated later chunks). Keep ModelSamplingMiniMaxH3 at 3.0/3.0 and don't stack a sigma-transform node afterward. A few other realities: the model's generated audio is discarded, so keep your driving clip's audio and mux it at save time; joins can still show motion or identity jumps despite the carry; and the whole clip, master latent and final decode still need memory - chunking doesn't make an arbitrarily long clip fit in VRAM, it just makes it render. Remember the weight-side licence too: the model is a MiniMax-H3 derivative under the MiniMax H3 Community License, which excludes the US, EU, UK and South Korea.

Categorysampling/viggle

Inputs (8)

NameTypeDefaultDescription
guiderGUIDERFrom BasicGuider / CFGGuider. Only its model, cfg and negative matter — the positive is replaced per chunk from the cond_set.
samplerSAMPLERFrom KSamplerSelect or RES4LYF — reused for every chunk.
sigmasSIGMASThe step schedule (BasicScheduler etc.) — every chunk runs the identical schedule.
cond_setVIGGLE_COND_SETFrom Viggle-Animate Conditioning (H3, Windowed).
vaeVAEMiniMax-H3 video VAE. Decodes the finished master latent once; the model's (silent) audio half is discarded — keep your driving clip's own audio at save time.
seedINT00–18446744073709550000Base seed. Chunk i renders with seed + i, so the chunks vary independently while staying reproducible.
rerender_chunkINT00–641-based chunk number to change (0 = off). Set a new rerender_seed to regenerate it and the following chunks; earlier chunks reuse cache when available.
rerender_seedINT00–18446744073709550000Seed for the chunk selected by rerender_chunk. Type a new number for a new take.

Outputs (2)

NameTypeDescription
framesIMAGE
chunk_mapSTRING