File size: 6,590 Bytes
901e737
 
669e431
 
 
 
 
 
 
 
 
a5a31d6
 
 
 
8e8792f
 
a5a31d6
 
 
8e8792f
a5a31d6
470fd08
a5a31d6
abda2c5
a5a31d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
---
license: apache-2.0
base_model:
- Wan-AI/Wan2.2-T2V-A14B
pipeline_tag: text-to-video
tags:
- looping
- RGB
- RGBA
- video
- generation
---

<div align="center">

  <h1 style="font-size:2.5em; font-weight:700; line-height:1.25; margin:0 0 16px; padding-bottom:.3em; border-bottom:1px solid rgba(128,128,128,.35);">
    <img src="assets/loopy-logo.apng" alt="Loopy logo" height="42" style="height:1.2em; width:auto; display:inline-block; vertical-align:middle; margin-right:10px;"/>
    Loopy
  </h1>

  <h3 style="font-size:1.5em; font-weight:600; line-height:1.3; margin:0 0 16px;">Seamless Video Loop Generation via Anchored Looping Shift of Positional Embedding</h3>

[![arXiv](https://img.shields.io/badge/arXiv-2608.23090-red)](http://arxiv.org/abs/2608.23090)
[![Project Page](https://img.shields.io/badge/Project_Page-Link-green)](https://donghaotian123.github.io/Loopy/)
[![GitHub](https://img.shields.io/badge/GitHub-Repo-black?logo=github)](https://github.com/WeChatCV/Loopy)

</div>

<img src="assets/teaser.png" alt="Loopy Qualitative Results" style="max-width: 100%; height: auto;">

>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**.

---

### 🔥 News
* **[2026.8.24]** Released Loopy, the Wan2.2-T2V-A14B–adapted weights and inference code are now open-sourced.
* **[2026.8.24]** Our technical report is available on [arXiv](https://arxiv.org/abs/XXXX.XXXXX).

---

### 📝 To-Do List

- [x] **Paper**: Release the technical report on arXiv.
- [x] **Inference Code**: Released the looping inference pipeline for Loopy.
- [x] **Model Weights**: Release the high-noise / low-noise LoRA checkpoints.

---
### 🌟 Showcase

##### Seamless Looping Video Generation

<!-- | Prompt | Preview Video | Alpha Video |
| :---: | :---: | :---: |
| "Medium shot. A little girl holds a bubble wand and blows out colorful bubbles that float and pop in the air. The background of this video is transparent. Realistic style." |
  <div style="display: flex; gap: 10px;">
    <img src="girl.gif" alt="..." style="flex: 1; min-width: 200px;">
  </div> |
  <div style="display: flex; gap: 10px;">
    <img src="girl_pha.gif" alt="..." style="flex: 1; min-width: 200px;">
  </div> | -->
| Preview Video | Preview Video |
| :---: | :---: |
| <img src="assets/human.apng" width="320" height="180" style="object-fit:contain; display:block; margin:auto;"/> | <img src="assets/loopy-6.apng" width="320" height="180" style="object-fit:contain; display:block; margin:auto;"/> |

##### For more results, please visit [Our Website](https://donghaotian123.github.io/Loopy/)

### 🚀 Quick Start

##### 1. Environment Setup

```bash
# Clone the project repository
git clone https://github.com/WeChatCV/Loopy.git
cd Loopy

# Create and activate Conda environment
conda create -n Loopy python=3.11 -y
conda activate Loopy

# Install dependencies
pip install -r requirements.txt
```

##### 2. Model Download

Download [Wan2.2-T2V-A14B](https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B)

Download the LightX2V 4-step distillation LoRAs for both experts:
[high noise](https://huggingface.co/lightx2v/Wan2.2-Distill-Loras/blob/main/wan2.2_t2v_A14b_high_noise_lora_rank64_lightx2v_4step_1217.safetensors) /
[low noise](https://huggingface.co/lightx2v/Wan2.2-Distill-Loras/blob/main/wan2.2_t2v_A14b_low_noise_lora_rank64_lightx2v_4step_1217.safetensors)

Download [Loopy](https://huggingface.co/htdong/Loopy) (`high_noise.safetensors` and
`low_noise.safetensors`)

---

### 🧪 Usage

Write one prompt per line in a plain UTF-8 text file, then launch the batch inference:

```bash
output_path="./checkpoints"
mkdir -p $output_path

torchrun --nproc_per_node=8  generate_2.2_new.py --task t2v-A14B --size 832*480 \
        --ckpt_dir Wan-AI/Wan2.2-T2V-A14B \
        --dit_fsdp --t5_fsdp --ulysses_size 8 \
        --frame_num 53 \
        --sample_steps 4 \
        --high_lightx2v_path "wan2.2_lora/wan2.2_t2v_A14b_high_noise_lora_rank64_lightx2v_4step_1217.safetensors" \
        --low_lightx2v_path "wan2.2_lora/wan2.2_t2v_A14b_low_noise_lora_rank64_lightx2v_4step_1217.safetensors" \
        --high_lora_path high_noise.safetensors \
        --low_lora_path low_noise.safetensors \
        --prompt_file prompt.txt \
        --output_dir $output_path/results  2>&1 | tee -a $output_path/results.log

```

Or simply run the packaged script after editing the paths inside it:

```bash
bash test.sh
```

You can specify the weights of `Wan2.2-T2V-A14B` with `--ckpt_dir`, the LightX2V distillation
LoRAs with `--high_lightx2v_path` / `--low_lightx2v_path`, and the Loopy LoRAs with
`--high_lora_path` / `--low_lora_path`. Wan2.2-T2V-A14B is a two-expert MoE model, so the
high-noise and low-noise branches each need their own pair of LoRAs.

Generated videos are written to `--output_dir`, one subdirectory per prompt, each containing
`fgr.mp4`.



**Prompt Writing Tip:** Describe a subject whose motion is naturally periodic or continuous —
falling snow, drifting clouds, flowing water, a walking animal, a rotating object. State the
visual style and the shot type (close-up, medium shot, wide shot) as well. Prompts support
both Chinese and English input.

```bash
# An example of prompt.
An Arctic fox leaps nimbly through the snow while hunting, its white fur blending seamlessly with the snowflakes. Realistic style; a scene of winter wildlife.
```

---

### 🤝 Acknowledgements

This project is built upon the following excellent open-source projects:
* [Wan2.2](https://github.com/Wan-Video/Wan2.2) (base video generation model)
* [LightX2V](https://github.com/ModelTC/LightX2V) (inference acceleration)
* [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio) (training/inference framework)

We sincerely thank the authors and contributors of these projects.

---

### ✏️ Citation

If you find our work helpful for your research, please consider citing our paper:

```bibtex
@article{haotiandong2026loopy,
  title   = {Loopy: Seamless Video Loop Generation via Anchored Looping Shift of Positional Embedding},
  author  = {Haotian Dong, Wenjing Wang, Chen Li, Jing Lyu, Xin Wang, Di Lin},
  journal = {arXiv preprint},
  year    = {2026}
}
```

---

### 📬 Contact Us

If you have any questions or suggestions, feel free to reach out via
[GitHub Issues](https://github.com/WeChatCV/Loopy/issues). We look forward to your feedback!