Loopy: Seamless Video Loop Generation via Anchored Looping Shift of Positional Embedding
2026-08-24 • Computer Vision and Pattern Recognition
Computer Vision and Pattern Recognition
AI summaryⓘ
The authors found a new way to make looping videos smoother and better by studying how video models understand the order of frames over time. They discovered that certain parts of the model control time perception more strongly and used this as a fixed point or anchor to help the rest of the video loop naturally. By adjusting how the model views time from a line into a loop, they created a system called Loopy that produces high-quality looping videos with extra features like style changes. Their method improves how consistent and clear the looped videos look.
looping videosposition embeddingattention layersDiT modeltemporal ordervideo generationcontextual priorstemporal consistencyRGB videosRGBA videos
Authors
Haotian Dong, Wenjing Wang, Chen Li, Jing Lyu, Xin Wang, Di Lin
Abstract
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.