Looping videos are essential for practical applications such as web graphics, game development, and social media. However, existing approaches typically fail to generate high-quality looping videos due to the neglect of how video generation models perceive temporal order and how this relates to the looping behavior. In this work, we are the first to reveal that position embedding at different attention layers within DiT exhibits varying levels of positional control, with the most pronounced layer acting as an anchor. We formulate this anchored layer as the reference point of the looping video, offering strong contextual priors for the remaining layers to facilitate the generation of seamless and coherent video content. Based on this insight, we propose an anchored position embedding shifting strategy that applies layer-specific shift lengths according to each layer's temporal control effect, effectively transforming DiT's temporal perception from a straight line to a circle. Leveraging this strategy, we develop a general framework, Loopy, for high-quality looping video generation, supporting both RGB and RGBA videos, while also enabling advanced AIGC features such as identity control and style transfer. Experiments demonstrate that our approach significantly improves temporal consistency and visual fidelity in generated looping videos. The released model is available on our website: https://donghaotian123.github.io/Loopy.
Figures & tables
Figure 1. Our Loopy generates high-quality looping videos with seamless transitions at loop boundaries and diverse motion. It also supports RGBA with semi-transparent effects. In the application block, all elements—including game assets and Loopy character stickers—are generated by our Loopy .
Figure 2. Comparison with Wan2.2 ( 39 ) in text-to-video (T2V) and first-last-frame-to-video (FLF2V) modes. FLF2V and our method use the same prompt. Although the prompt explicitly requests a looping scene, T2V fails to produce a seamless loop, while FLF2V degenerates to a nearly static video. Neither mode generates a looping video with vivid motion.
Figure 3. The proposed temporal shifting operation on Wan2.2 14B ( 39 ) . Given a noisy video latent zn , DiT first patchifies it and maps patches into tokens, which are processed by L DiT blocks. At layer l , self-attention applies a temporal shifting offset δl to the RoPE, which is then applied to the Q and K matrices. After all DiT blocks, tokens are unpatchified back to latents to produce v^n′ . Iterative diffusion denoising yields the predicted clean latent z , which is decoded by the VAE to generate the final video.
Figure 4. Effect of RoPE on the temporal positional control αl at the lth attention layer across state-of-the-art video generation models. Wan2.1 1.3B ( 39 ; 15 ) , Wan2.1 14B ( 39 ; 15 ) , Wan2.2 14B ( 39 ; 15 ) , and Hunyuanvideo 1.5 ( 15 ) are used for RGB looping video generation, while Wan-Alpha ( 8 ) is used for RGBA looping video generation.
Figure 5. Comparison between the original mode and our temporal shifting. The open ring visualizes DiT’s temporal perception, with clockwise motion indicating video progression. Continuous segments represent periods where DiT preserves temporal continuity, while gaps mark discontinuities—specifically, the transition from the video’s end back to its beginning.
Figure 6. Comparison of Wan2.2 14B ( 39 ) and HunyuanVideo 1.5 ( 15 ) outputs when shifting RoPE at the layers with the first- and second-largest αl , relative to the original generated videos.
Figure 7. Comparison of the original mode, the progressively increasing strategy, and our method.
Figure 8. Results of (a) naive progressively increasing offsets and (b) our strategy. The naive strategy fails to produce seamless loops, causing noticeable temporal flickering between the final and first frames, as evidenced by the snow on the tree trunk indicated by the arrow.
Proposed Anchor
Grouped Shifting
Fine-tuning
Cyclic Smoothness ↑
0.9753
✓
0.9802
✓
0.9818
✓
✓
0.9878
✓
✓
✓
0.9925
Table 1. Ablation analysis of the Proposed Anchor , Grouped Shifting and Finetuning . We examine the effect of removing various components on looping video generation performance. We compare our Loopy (see the last row) with different alternative variants in terms of Cyclic Smoothness.
Method
Anchored Layer
Offset Strategy
Fine-tuning
R1
R2
R3
R4
Proposed Anchor
Naive Shifting
Grouped Shifting
Baseline
Loopy
Cyclic Smoothness
0.9779
0.9789
0.9781
0.9739
0.9878
0.9818
0.9878
0.9802
0.9925
Table 2. Strategy Selection of Loopy. We investigate the effects of anchored layer selection ( Anchored Layer ), different offset strategies ( Offset Strategy ), and fine-tuning with or without the proposed Loopy ( Fine-tuning ), and report the corresponding performance in terms of cyclic smoothness.
Figure 9. Comparison of results without and with post-processing for correcting brightness and color jitter.
Figure 10. Samples from our looping video training data. The first two rows demonstrate vivid motion and seamless temporal looping consistency, while the bottom two rows highlight the scene diversity of our dataset.
Method
Cyclic Smoothness ↑
Dynamic Score ↑
33
0.9733
1.74
18
0.9751
1.70
1
0.9702
1.52
22
0.9898
1.30
EDEN ( 49 )
0.9824
0.38
Loopy
0.9925
3.20
Table 3. Quantitative comparison with conventional looping video generation approaches, including four pre-AI methods and FLF2V interpolation-based EDEN. Our Loopy achieves state-of-the-art performance across all evaluation metrics.
Method
Text Alignment ↑
Aesthetic Quality ↑
Naturalness ↑
Motion Smoothness ↑
Cyclic Smoothness ↑
Dynamic Score ↑
Wan2.1 1.3B
LatentMix
3.24
0.5753
2.16
0.9841
0.9847
2.88
Mobius
3.34
0.5803
2.39
0.9826
0.9826
2.48
Ours
3.42
0.6246
2.56
0.9861
0.9914
2.92
Wan2.1 14B
LatentMix
3.52
0.5664
2.78
0.9825
0.9876
2.30
Mobius
2.78
0.5964
2.93
0.9718
0.9918
3.20
Ours
3.68
0.6474
3.28
0.9878
0.9928
3.32
Table 4. Quantitative comparison with two currently available looping strategies, LatentMix ( 9 ) and Mobius ( 4 ) , across four representative RGB video generation backbones: Wan 2.1 1.3B ( 39 ) , Wan 2.1 14B ( 39 ) , Wan 2.2 14B ( 39 ) , and HunyuanVideo 1.5 ( 15 ) . Our Loopy achieves superior performance across all evaluation metrics.
Figure 11. Ablation study of training with (Ours) and without (Base + Our Data) anchored shifting on our looping video dataset.
Method
Text Alignment ↑
Aesthetic Quality ↑
Naturalness ↑
Motion Smoothness ↑
Cyclic Smoothness ↑
Dynamic Score ↑
LatentMix + Wan-Alpha
3.22
0.576
2.65
0.9877
0.9907
3.19
Mobius + Wan-Alpha
3.26
0.589
2.76
0.9912
0.9851
3.14
Loopy + Wan-Alpha
3.46
0.636
3.14
0.9927
0.9921
3.35
Table 5. Quantitative comparison on text-to-RGBA video generation methods. We integrate Loopy and two currently available looping strategies, LatentMix ( 9 ) and Mobius ( 4 ) , into the RGBA video generation backbone Wan-Alpha ( 8 ) . Our Loopy achieves state-of-the-art performance across all evaluation metrics compared to competitive looping approaches.
Figure 12. Box plots of the average score over the participants for each method regarding motion coherence, motion diversity, and realism.
Figure 13. Comparison of different RGB looping video generation approaches integrated into Wan2.1 1.3B. We zoom in on selected regions of the initial (see red rectangles) and final (see blue rectangles) video frames to better visualize the results produced by different approaches.
Figure 14. Comparison of different RGB looping video generation approaches integrated into Wan2.1 14B. We zoom in on selected regions of the initial (see red rectangles) and final (see blue rectangles) video frames for better visualization. Our Loopy achieves seamless transitions at the loop boundary while mitigating artifacts.
Figure 15. Comparison of different RGB looping video generation approaches integrated into Wan2.2.
Figure 16. Comparison of different RGB looping video generation approaches integrated into Hunyuanvideo 1.5.
Figure 17. Comparison of different RGBA looping video generation approaches integrated into Wan-Alpha. We zoom in on selected regions of the initial (see red rectangles) and final (see blue rectangles) video frames for better visualization. Benefiting from our proposed anchored shifting strategy, Loopy achieves realistic RGBA looping video generation without introducing artifacts and incoherent color variations.
Figure 18. Loopy can generate videos of all lengths that are supported by the base model.
Figure 19. Application of our Loopy for character control. It can generate stable Welsh Corgi (left) and Loopy (right) characters across various scenes.
Figure 20. Application of our Loopy for style control. It can generate videos in Game Art (left) and 3D Cartoon (right) styles with different content.
Figure 21. Application of our Loopy for multi-layer video generation. By combining the generated RGB and RGBA videos, the model can produce a vivid multi-layer looping video.