Video Prefix Context Noise
Making H3 forget the character you just swapped out
- images
- images
Continuation is usually a fight for consistency: you want the model to keep the same face, the same jacket, the same room. Sometimes you want the opposite. Redraw the character between segments - a swap, a costume change, a scene that continues while the person changes - and every frame of clean context you hand H3 is an argument for keeping the old look. Show it twenty-two crisp frames of Character A and it will cheerfully keep drawing Character A.
This node is the "stop looking at that" button. It takes a complete prefix batch, deliberately wrecks most of it with coarse colour-block noise, and leaves only the last few frames clean. Normally the whole game is consistency - the community's long-running fight is keeping a character recognisable across clips - and this node is what you reach for when you want the model to let go.
The recipe, and where it comes from
The defaults aren't made up. They're an empirical recipe credited in the pack to MacroSony's H3 chained-character-swap work and beijinren's ComfyUI-H3-Context-Noise implementation, and they're tuned for the 22-frame H3 continuation prefix:
tail_protection_frames= 5 - the last five frames stay clean.transition_frames= 4 - the four immediately before them blend fromstrength(0.45) down toend_strength(0.10), getting cleaner as they approach the tail.- everything older gets
strengthapplied flat.
So a 22-frame prefix comes out as 13 frames of full noise, 4 frames ramping from 0.45 down to 0.10, and 5 untouched frames - the "13 full + 4 transition + 5 clean" layout the README describes. Crucially you don't have to tell it the prefix is 22 frames. It treats whatever batch it's given as the prefix and works backwards from the tail, which is why it stays correct when you change your segment length.
Two things about strength worth internalising. It's a flat blend alpha, not Gaussian sigma - the tooltip says so because people assume the usual "noise amount" semantics and then wonder why 1.0 looks like confetti. And it's a straight lerp against a generated block pattern, so it's deterministic for a given seed.
Inputs worth touching
images is optional in the schema, and a missing IMAGE passes through as absent rather than erroring - which matters when it sits in front of Video Continuation Concat's prefix_images socket, because on the first pass of a chain that socket is legitimately empty.
seed (with control-after-generate) decides the pattern; it's the only real "flavour" knob for the noise itself. pattern (advanced) picks between poc_chroma_blocks (default), gaussian_rgb, and uniform_rgb - the default uses six low-saturation chroma tones rather than RGB static. grid_mode (advanced) defaults to poc_36x64, a fixed coarse block grid; switch it to block_size with block_size (default 16) if you want blocks scaled to your resolution instead. There is one output: images.
Short batches degrade gracefully and in a specific order: the clean tail is allocated first, then as much transition as fits, and full-noise region last. Feed it 6 frames at the defaults and you get clean tail plus a bit of taper, not a wall of noise with no anchor.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/wjie98/comfyui-svdint4.git
# restart ComfyUI
The repo goes by comfyui-svdint4 on GitHub and in Manager while its README calls itself "ComfyUI Turing Utils" and clones comfyui-turing-utils - one pack, renamed at some point, folder name doesn't matter. Nothing to download and nothing extra to install: this node is pure torch, and the pack's requirements.txt only adds safetensors. The README's CUDA kernel build is for the attention/quantisation nodes, not this one.
Where it bites
end_strength must not exceed strength - you'll get a validation error rather than a weird render, which is the nice version of that mistake.
Don't apply it to the wrong side of the chain. This is for the prefix - the context you're deliberately neutralising. Noise your freshly generated body and you've just destroyed the shot. In the loop it sits between the loader (Load Indexed Video Segment, tail_frames 22) and Video Continuation Concat's prefix_images.
And it is not a strength dial for continuation quality. If a normal continuity chain is drifting, adding context noise makes it worse, because you've removed the signal it was supposed to anchor to. Use it when you want the character to change; leave it out - or set tail_protection_frames high enough to be a no-op - when you want them to stay the same.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| tail_protection_frames | INT | 50–16384 | Clean frames reserved at the end of the complete prefix before any noise is allocated. |
| strength | FLOAT | 0.450–1 | Flat blend alpha for the validated H3 context-noise recipe; this is not Gaussian sigma. |
| seed | INT | 00–18446744073709550000 | — |
| end_strength | FLOAT | 0.100–1 | — |
| transition_frames | INT | 40–4096 | Frames immediately before the clean tail that taper from full to end strength. |
| pattern | COMBO | poc_chroma_blocks | 3 options: poc_chroma_blocks, gaussian_rgb, uniform_rgb |
| grid_mode | COMBO | poc_36x64 | 2 options: poc_36x64, block_size |
| block_size | INT | 161–256 | — |
| imagesopt | IMAGE | A missing IMAGE is passed through as None. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |