Nodes/IAMCCS-nodes/MoveAhead (FreeLong spectral blend) ??
ComfyUI Node

MoveAhead (FreeLong spectral blend) ??

FreeLong spectral blending for WAN 2.2, minus the academic paper

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
MoveAhead (FreeLong spectral blend) ??
  • model
  • model
enabledtrue
blend_strength0.8
low_freq_ratio0.80
auto_windowtrue
manual_window_frames
blend_curveflat
blend_start_block0
blend_end_block-1
vram_presetnormal

Long WAN 2.2 videos drift. Generate past the ~81-frame native sweet spot and the motion starts wandering - direction changes, subjects veer, continuity falls apart. The research answer is FreeLong (NeurIPS 2024), which blends the model's attention between the full sequence and a moving window in the frequency domain, keeping global motion anchored while local detail stays sharp. IAMCCS_MoveAhead is that technique packaged as a MODEL in → MODEL out patch node for WAN 2.2, no paper required.

It's from IAMCCS-nodes, and it literally replaces the author's earlier WanFreeLong node (the source comments say so). Drop it between your model loader and KSampler, set it once, and the long-clip drift is the thing it's built to attack.

How it works

Instead of forcing the whole long sequence through the transformer at once (memory explosion) or chopping it into independent chunks (motion drift at seams), MoveAhead runs attention in a window and then blends the window stream with a global, full-sequence stream in the frequency domain. Low frequencies carry the broad motion direction; high frequencies carry detail. low_freq_ratio (0.8) decides how much of the spectrum comes from the global stream - higher means smoother, more anchored motion with softer detail; lower means sharper but drift-prone.

blend_strength (0.8) is the overall blend intensity - 0 is pure passthrough, 1 is full blend. The window itself is handled by auto_window (recommended): it detects the latent frame count and uses roughly 40% of it as the window. blend_curve (flat vs sigmoid) changes how the blend is applied across transformer blocks - sigmoid starts near-zero in early blocks and ramps up, so early blocks establish global motion while later blocks add detail. blend_start_block/blend_end_block (-1 = all blocks) scope which transformer blocks participate. vram_preset (low/normal/high) tunes the FFT chunking - a real lever on tight cards.

Inputs and outputs

  • model (MODEL) - WAN 2.2 model.
  • enabled (BOOLEAN, true) - leave connected, toggle for A/B.
  • blend_strength (0.8), low_freq_ratio (0.8), auto_window (true), manual_window_frames (STRING, used only with auto off - "33 for 81-frame videos"), blend_curve (flat), block range, vram_preset (normal).

Output: model (MODEL) - patched, sampler-ready.

How to install

Ships in IAMCCS-nodes. ComfyUI Manager search "IAMCCS", or:

cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git

Restart. No model downloads. Pack floors: ComfyUI ≥ 0.3.0, Python ≥ 3.12, Torch ≥ 2.8.

Gotchas

Defaults are sane - don't touch everything. blend_strength 0.8 and low_freq_ratio 0.8 are the author's tested starting points; the single most common mistake is cranking low_freq_ratio to 1.0 for max smoothness and getting motion that's technically stable but visually dead. If the standard node still shows direction drift, that's exactly what the MoveAheadEnforcer variant is for. And be realistic about what this fixes: FreeLong-style blending helps continuity within a long generation, but WAN's deeper limits - 81-frame native context, cross-chunk identity drift - still favor the segmented workflow with motion bridges or VACE for genuinely long-form work. This is the "make one long clip hold together" tool, not a replacement for stitching.

CategoryIAMCCS/Wan

Inputs (10)

NameTypeDefaultDescription
modelMODEL
enabledBOOLEANtrueEnable / disable MoveAhead. Leave connected and toggle for quick A/B.
blend_strengthFLOAT0.80–1How strongly the spectral blend affects the output. 0 = passthrough, 1 = full blend. 0.8 is a safe default.
low_freq_ratioFLOAT0.800–1Fraction of the frequency spectrum taken from the global (full-sequence) stream. Higher → smoother motion, less detail. Lower → sharper but may drift. 0.8 is a good balance for most scenarios.
auto_windowBOOLEANtrueAUTO window mode. When enabled, MoveAhead auto-detects latent frames and uses a window of ~40% of the detected length.
manual_window_framesSTRINGManual window size in VIDEO frames (example: 33 for 81-frame videos). Used only if AUTO window is OFF.
blend_curveCOMBOflatflat = constant blend_strength across all blocks (original behaviour). sigmoid = strength ramps from near-zero at the first blocks to full blend_strength at later blocks. Early blocks keep global motion anchoring, later blocks progressively add detail blending.
blend_start_blockINT00–40Transformer block at which blending starts (0 = first block).
blend_end_blockINT-1-1–40Transformer block at which blending ends (-1 = all blocks, respects actual model depth).
vram_presetCOMBOnormalVRAM preset for the FFT blending implementation. low = smallest chunks (slowest, safest), normal = balanced, high = larger chunks (faster).

Outputs (1)

NameTypeDescription
modelMODEL