Nodes/AnimateDiff Evolved/Visualize Context Options (K.) πŸŽ­πŸ…πŸ…“
ComfyUI Node Runs on cloud

Visualize Context Options (K.) πŸŽ­πŸ…πŸ…“

See your sliding context windows before you pay for the run

By KosinkadinkΒ·Created 3 years agoΒ·Updated 8 days agoΒ· 3,519
Visualize Context Options (K.) πŸŽ­πŸ…πŸ…“
  • model
  • context_opts
  • IMAGE
β—„sampler_nameβ–Ύβ–Ί
β—„schedulerβ–Ύβ–Ί
β—„visual_width1440β–Ί
β—„latents_length32β–Ί
β—„steps20β–Ί
β—„denoise1.00β–Ί

Context Options is powerful and genuinely fiddly - get the window length, overlap, or schedule wrong and you find out by watching an expensive multi-minute generation come out with visible seams or a weird pace change partway through. Visualize Context Options (K.) exists so you don't have to find out that way. It doesn't render a single pixel of your actual video; it simulates your windowing plan against a standard KSampler-style schedule and draws you a picture of which frames belong to which context window at each step, so you can sanity-check the plan before committing real GPU time.

How it works

It takes the model and sampler settings you'd normally feed a KSampler, works out the timestep schedule those settings would produce, then walks through it step by step applying your Context Options plan the same way the real sampler would - except instead of denoising latents, it renders a chart. No VAE, no actual frames, no motion module execution. It's a dry run of the scheduling logic alone, which is exactly why it's fast and cheap to iterate on compared to just running the real thing and eyeballing the output.

The inputs and outputs that matter

  • model (MODEL, required) - the model you're actually going to sample with. Needed because the schedule this node simulates has to match what your real KSampler would produce for that model.
  • sampler_name / scheduler (COMBO, required) - match these to whatever you're actually running. Different sampler/scheduler pairs produce different step schedules, so mismatching them here means you're previewing a plan you won't actually get.
  • context_opts (CONTEXT_OPTIONS, optional) - the Context Options config you want to check. Leave it unplugged to see what a run with no windowing at all looks like, as a baseline.
  • steps (INT, default 20) and denoise (FLOAT, default 1) - mirror your real KSampler's step count and denoise strength; these change which portion of the schedule gets simulated.
  • visual_width (INT, default 1440) - pixel width of the output chart, purely cosmetic.
  • latents_length (INT, default 32) - how many frames the simulation pretends you have. You don't need an actual 32-frame batch sitting around; this is a stand-in you set to whatever length you're planning.

Output is a single IMAGE - wire it to a Preview Image or Save Image node like you would anything else.

How to install it

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

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

then restart. This particular node doesn't need a motion module to run - it's inspecting the sampler schedule and your Context Options, not executing AnimateDiff - but you'll obviously want one loaded for the real generation you're checking against.

Common issues & troubleshooting

You wired it up expecting a video frame and got a chart instead. That's correct behavior, not a bug - this is a diagnostic tool, not a generator. Drop the IMAGE output into a Preview Image node and read it as a schedule map, not as output footage.

Your real workflow uses a start/end step range, not plain steps + denoise. If you're driving generation with a KSamplerAdvanced-style node (partial denoise, multi-stage pipelines), this node's steps/denoise pair won't reproduce that setup faithfully - use the sibling Visualize Context Options (K.Adv.) node instead, which takes start_step/end_step directly.

Your real workflow uses a custom sigma schedule. If you're not using a plain sampler_name/scheduler combo at all - say you built your own SIGMAS elsewhere - this node can't reconstruct that. Use Visualize Context Options (S.Cus.), which takes a SIGMAS input directly instead of reconstructing one.

latents_length doesn't match your real frame count. The default of 32 is just a placeholder. Set it to the actual length you're planning to generate before you trust what the chart shows you - a windowing plan can look fine at 32 frames and misbehave at 96.

CategoryAnimate Diff πŸŽ­πŸ…πŸ…“/context opts/visualize

Inputs (8)

NameTypeDefaultDescription
modelMODELβ€”
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
context_optsoptCONTEXT_OPTIONSβ€”
visual_widthoptINT144032–16384β€”
latents_lengthoptINT321–9007199254740991β€”
stepsoptINT200–9007199254740991β€”
denoiseoptFLOAT1.000–1β€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”