Nodes/AnimateDiff Evolved/Context Optionsโ—†Views Only [VRAMโ‡ˆ] ๐ŸŽญ๐Ÿ…๐Ÿ…“
ComfyUI Node Runs on cloud

Context Optionsโ—†Views Only [VRAMโ‡ˆ] ๐ŸŽญ๐Ÿ…๐Ÿ…“

Sliding windows without the whole-UNet pass

By KosinkadinkยทCreated 3 years agoยทUpdated 8 days agoยท 3,519
Context Optionsโ—†Views Only [VRAMโ‡ˆ] ๐ŸŽญ๐Ÿ…๐Ÿ…“
  • view_opts_req
  • prev_context
  • CONTEXT_OPTS
โ—„start_percent0.000โ–บ
โ—„guarantee_steps1โ–บ

AnimateDiff's motion module was trained on 16 frames. Everything past that is a trick - and the trick, sliding context windows, is the single feature that made Kosinkadink's AnimateDiff-Evolved the extension everyone actually uses instead of the reference implementation. The pack gives you two separate knobs for it: Context Options, which slides a window across the whole UNet, and View Options, a lighter-weight windowing scheme that operates only inside the motion module itself. This node is the bridge between them - it lets you drive your generation using nothing but a View Options config, skipping the heavier whole-UNet context pass entirely.

How it works

Every node that applies your motion model - Apply AnimateDiff Model, the Gen2 nodes, Evolved Sampling - expects a CONTEXT_OPTIONS object on its context input. Normally you build that with one of the other Context Options nodes (Standard Uniform, Looped Uniform, and so on), which set up the full sliding-window plan across the UNet. This node instead takes a VIEW_OPTS object - built with a separate View Options node - and repackages it as a CONTEXT_OPTIONS, so the motion module does its own internal windowing and the rest of the UNet just runs normally. It's the "views only" path the name says it is: you're opting out of the expensive whole-model context machinery and letting the lighter mechanism carry the windowing on its own.

The inputs and outputs that matter

  • view_opts_req (VIEW_OPTS, required) - this is the node that actually defines your window (length, overlap, and so on); build it with a View Options node upstream. This node doesn't work standalone.
  • start_percent (FLOAT, 0โ€“1, default 0) - where in the sampling process this config becomes active, as a fraction of total progress. This is what makes the "scheduling Context Options across different points" feature in the README possible: chain several of these at different start_percents and your windowing strategy can change mid-run.
  • guarantee_steps (INT, default 1) - the minimum number of sampling steps this config runs once it kicks in, so a narrow slice of a schedule doesn't get skipped over entirely if steps land awkwardly.
  • prev_context (CONTEXT_OPTIONS, optional) - chains to a previous Context Options node, same linked-list pattern as everything else in this pack, so you can stack multiple windowing strategies across one run.

Output is CONTEXT_OPTS, which goes into the context_opts (or equivalent) input on your Apply AnimateDiff Model / Gen2 node.

How to install it

Through ComfyUI Manager: search AnimateDiff Evolved, verify the author is Kosinkadink, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved

then restart. You need a motion module regardless of which Context Options node you use - grab one of the mm_sd_v1* checkpoints and put it in ComfyUI/models/animatediff_models. Context and View Options are free to configure; they don't need their own downloads.

Common issues & troubleshooting

You want the "infinite length" feature and this isn't giving it to you. The famous unlimited-context capability everyone associates with AnimateDiff-Evolved comes from the whole-UNet sliding window - the thing this node deliberately skips. If your goal is generating past 16 frames with the standard windowing behavior, reach for one of the regular Context Options nodes (Standard Uniform / Looped Uniform) instead of this one.

Nothing is windowing at all. Since this node's only real config lives behind view_opts_req, forgetting to build and connect a View Options node upstream means you're feeding it an unconnected required input rather than a meaningful config - check that link first.

Scheduling across start_percent gets confusing fast. Chaining several Context Options nodes to change strategy mid-generation is a real, documented capability of this pack, but it's also the kind of thing that's easy to get subtly wrong on the first try. Get a single config working end to end before you start layering prev_context chains - verify what you're actually building with a Visualize Context Options node before spending GPU time on the full run.

CategoryAnimate Diff ๐ŸŽญ๐Ÿ…๐Ÿ…“/context opts

Inputs (4)

NameTypeDefaultDescription
view_opts_reqVIEW_OPTSโ€”
start_percentoptFLOAT0.0000โ€“1โ€”
guarantee_stepsoptINT10โ€“9007199254740991โ€”
prev_contextoptCONTEXT_OPTIONSโ€”

Outputs (1)

NameTypeDescription
CONTEXT_OPTSCONTEXT_OPTIONSโ€”