Free-Lunch Long Video Generation via Layer-Adaptive O.O.D Correction
Organizations: Westlake University
Abstract
Generating long videos using pre-trained video diffusion models, which are typically trained on short clips, presents a significant challenge. Directly applying these models for long-video inference often leads to a notable degradation in visual quality. This paper identifies that this issue primarily stems from two out-of-distribution (O.O.D) problems: frame-level relative position O.O.D and context-length O.O.D. To address these challenges, we propose FreeLOC, a novel training-free, layer-adaptive framework that introduces two core techniques: Video-based Relative Position Re-encoding (VRPR) for frame-level relative position O.O.D, a multi-granularity strategy that hierarchically re-encodes temporal relative positions to align with the model's pre-trained distribution, and Tiered Sparse Attention (TSA) for context-length O.O.D, which preserves both local detail and long-range dependencies by structuring attention density across different temporal scales. Crucially, we introduce a layer-adaptive probing mechanism that identifies the sensitivity of each transformer layer to these O.O.D issues, allowing for the selective and efficient application of our methods. Extensive experiments demonstrate that our approach significantly outperforms existing training-free methods, achieving state-of-the-art results in both temporal consistency and visual quality. Code is available at https://github.com/Westlake-AGI-Lab/FreeLOC.
Figures & tables
| Model | #Frames | Method | Video Consistency | Video Quality | ||||
| Subject Consistency( ) | Background Consistency( ) | Motion Smoothness( ) | Imaging Quality( ) | Aesthetic Quality( ) | Dynamic Degree( ) | |||
| Wan2.1 -T2V-1.3B | 161 (2 ) | Direct Sampling | 97.33 | 97.23 | 98.69 | 60.34 | 52.72 | 19.31 |
| Sliding Window | 96.48 | 96.22 | 98.50 | 64.64 | 54.42 | 40.82 | ||
| RIFLEx [ 40 ] | 97.21 | 97.14 | 98.70 | 60.62 | 53.67 | 23.45 | ||
| FreeLong [ 21 ] | 97.05 | 97.19 | 98.84 | 63.91 | 54.56 | 32.19 | ||
| FreeNoise [ 25 ] | 96.82 | 97.10 | 98.82 | 67.19 | 56.01 | 36.34 | ||
| Method | SC ( ) | BC ( ) | MS ( ) | IQ ( ) | AQ ( ) | DD ( ) |
| Direct | 98.50 | 97.89 | 98.83 | 59.21 | 49.43 | 4.32 |
| Direct+TSA | 97.41 | 96.76 | 98.67 | 65.87 | 57.05 | 37.01 |
| Direct+VRPR | 98.42 | 97.81 | 98.89 | 61.88 | 54.13 | 15.32 |
| Direct+ | 97.56 | 97.67 | 98.75 | 65.19 | 56.34 | 34.44 |
| Direct+ | 98.03 | 97.61 | 98.91 | 63.90 | 54.44 | 33.13 |
| Direct+ | 98.38 | 97.66 | 98.95 | 66.92 | 60.88 | 35.05 |
| Method | SC ( ) | BC ( ) | MS ( ) | IQ ( ) | AQ ( ) | DD ( ) |
| Clipping | 97.83 | 97.51 | 98.78 | 60.23 | 52.03 | 22.21 |
| Group | 97.95 | 97.49 | 98.66 | 59.91 | 51.32 | 18.32 |
| Our VRPR | 98.44 | 97.78 | 98.97 | 68.84 | 61.21 | 36.27 |
| Method | SC ( ) | BC ( ) | MS ( ) | IQ ( ) | AQ ( ) | DD ( ) |
| Sliding Window | 97.52 | 96.72 | 98.69 | 64.33 | 54.92 | 37.81 |
| Selected Frame Attention | 97.89 | 98.94 | 98.94 | 63.90 | 54.19 | 28.53 |
| Our TSA | 98.44 | 97.78 | 98.97 | 68.84 | 61.21 | 36.27 |
| Parameter | Wan2.1-T2V-1.3B | Hunyuan Video |
| Sampler | Unipc | Euler |
| Denoising Steps | 50 | 50 |
| CFG Scale | 6.0 | 6.0 |
| Resolution | (480p) | (480p) |
| Base Length (1x) | 81 frames | 127 frames |
| 2x Length | 161 frames | 253 frames |
| Method | SC ( ) | BC ( ) | MS ( ) | IQ ( ) | AQ ( ) | DD ( ) |
| Mid Frame | 98.14 | 97.65 | 98.91 | 67.12 | 59.83 | 34.65 |
| Last Frame | 98.19 | 97.68 | 98.87 | 67.48 | 60.98 | 35.72 |
| w/o Attention Sink | 98.05 | 97.67 | 98.92 | 67.53 | 60.92 | 34.59 |
| Our First Frame | 98.44 | 97.78 | 98.97 | 67.44 | 61.21 | 36.27 |
| Method | SC ( ) | BC ( ) | MS ( ) | IQ ( ) | AQ ( ) | DD ( ) |
| LI | 97.93 | 97.62 | 98.64 | 51.11 | 50.91 | 16.32 |
| YARN | 98.16 | 97.64 | 98.89 | 62.33 | 57.98 | 30.87 |
| NTK-aware | 97.89 | 97.59 | 98.82 | 56.47 | 53.54 | 24.21 |
| Our VRPR | 98.44 | 97.78 | 98.97 | 68.84 | 61.21 | 36.27 |
| Method | SC ( ) | BC ( ) | MS ( ) | IQ ( ) | AQ ( ) | DD ( ) |
| 2-stage | 98.15 | 97.69 | 98.90 | 65.33 | 58.91 | 33.42 |
| 4-stage | 98.49 | 97.93 | 98.95 | 67.91 | 60.90 | 35.97 |
| Our 3-stage | 9 8.44 | 97.78 | 98.97 | 67.44 | 61.21 | 36.27 |
| Method | SC ( ) | BC ( ) | MS ( ) | IQ ( ) | AQ ( ) | DD ( ) |
| Reverse | 98.02 | 97.28 | 98.87 | 62.12 | 57.12 | 31.23 |
| Half Implementation 1 | 98.18 | 97.41 | 98.91 | 64.21 | 59.12 | 32.19 |
| Half Implementation 2 | 98.22 | 97.48 | 98.94 | 62.39 | 60.91 | 32.92 |
| Interleaved | 98.12 | 97.32 | 98.89 | 63.20 | 59.92 | 33.59 |
| FreeLOC | 98.44 | 97.78 | 98.97 | 67.44 | 61.21 | 36.27 |
| Method | Inference Time (s/step) | Mem (GB) |
| Direct Sampling | 33.93 | 29.34 |
| Sliding Window | 16.72 | 30.33 |
| FreeNoise [ 25 ] | 17.21 | 30.34 |
| Freelong [ 21 ] | 48.15 | 40.71 |
| RIFLEX [ 40 ] | 33.94 | 29.34 |
| FreeLOC | 24.35 | 29.87 |
| Method | Content Consistency | Video Quality | Video-Text Alignment |
| Direct Sampling | 3.27 | 1.02 | 1.92 |
| Sliding Window | 1.17 | 3.25 | 2.34 |
| FreeNoise [ 25 ] | 1.20 | 2.88 | 2.68 |
| Freelong [ 21 ] | 3.59 | 2.11 | 2.98 |
| RIFLEX [ 40 ] | 3.31 | 1.09 | 1.89 |
| FreeLOC | 4.11 | 3.95 | 3.78 |
Long-Horizon Video Generation
Long-horizon video generation creates coherent, controllable videos over extended durations despite limited context and accumulating errors.
See all 164 papers