Context OptionsโStandard Uniform ๐ญ๐ ๐
The node that gave AnimateDiff unlimited length
- prev_context
- view_opts
- CONTEXT_OPTS
AnimateDiff's motion module was trained on exactly 16 frames. Left alone, that's your entire clip: 16 frames, two seconds at 8fps, done. This node is the fix, and it's the specific feature that made a September 2023 announcement thread hit 458 upvotes for the headline "Unlimited Context Length." Plug it into any loader's context_options slot and your video can run to hundreds or thousands of frames on the same VRAM budget, because the module only ever looks at one 16-frame window at a time - it just slides that window across your whole sequence, generates overlapping chunks, and blends them together.
"Uniform" is the schedule type: overlapping windows spaced evenly across the sequence, versus the "Static" variant (ADE_StandardStaticContextOptions) which chunks more rigidly. Uniform is the one most workflows default to, and it's also the classic AnimateDiff-Evolved sliding-context approach the whole feature is known for.
How it works
Instead of feeding your entire frame batch through the motion module at once, this generates overlapping windows of context_length frames, each offset by context_stride, sharing context_overlap frames with its neighbors. Overlapping frames get blended (governed by fuse_method) so you don't get a hard cut where one window ends and the next begins. VRAM cost scales with the window size, not your total clip length - that's the whole point, and it's why 1000+ frame clips are feasible on 24GB.
The inputs and outputs that matter
The three required numbers are the ones you'll actually tune: context_length (default 16 - match your motion module's native window, don't go far above it), context_stride (default 1), and context_overlap (default 4 - more overlap means smoother blends between windows, at the cost of more redundant compute).
Optional: fuse_method picks how overlapping frames blend, start_percent and guarantee_steps let you schedule when this context behavior kicks in during sampling, prev_context chains multiple Context Options together for scheduled switching mid-generation, and view_opts layers a second sliding window inside the motion module itself for even finer VRAM control. Output is CONTEXT_OPTS, which plugs into a loader's or Use Evolved Sampling's context_options input - nowhere else.
How to install it
Standard for the whole pack - ComfyUI Manager, search AnimateDiff Evolved by Kosinkadink, or:
cd ComfyUI/custom_nodes && git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved
No models to download for this node specifically; it's pure sampling logic that sits on top of whatever motion module you've already loaded.
Common issues & troubleshooting
Visible "morphing" or seams where windows overlap. This is the most-reported real-world issue with sliding context and it's inherent to the technique, not a bug - community reports consistently point to two fixes: raise context_overlap for a smoother blend, or lower your sampler's denoise strength on the affected pass, which reduces how much each window is free to diverge from its neighbor.
Set context_length way above 16. The module was trained at 16 frames; pushing this much higher tends to degrade motion coherence rather than help. Keep it near the native window and let the sliding mechanism handle length instead.
Nothing changes when you add this node. Check it's actually wired into the loader or Use Evolved Sampling's context_options input, not just sitting unconnected on the canvas - a common copy-paste mistake when assembling workflows from screenshots.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| context_length | INT | 161โ128 | โ |
| context_stride | INT | 11โ32 | โ |
| context_overlap | INT | 40โ128 | โ |
| fuse_methodopt | COMBO | 9 options: pyramid, flat, overlap-linear, ๐ฌdelayed reverse sawtooth, ๐ฌpyramid-sigma, ๐ฌpyramid-sigma inverse, +3 | |
| use_on_equal_lengthopt | BOOLEAN | false | โ |
| start_percentopt | FLOAT | 0.0000โ1 | โ |
| guarantee_stepsopt | INT | 10โ9007199254740991 | โ |
| prev_contextopt | CONTEXT_OPTIONS | โ | |
| view_optsopt | VIEW_OPTS | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONTEXT_OPTS | CONTEXT_OPTIONS | โ |