File size: 5,028 Bytes
e4f959c
 
 
 
 
 
 
 
 
 
 
aaafe32
e4f959c
 
 
 
 
 
aaafe32
e4f959c
 
aaafe32
 
e4f959c
 
 
aaafe32
 
 
e4f959c
 
 
aaafe32
e4f959c
 
 
 
aaafe32
 
e4f959c
aaafe32
 
e4f959c
aaafe32
e4f959c
 
aaafe32
 
 
 
 
 
 
e4f959c
 
aaafe32
e4f959c
 
 
aaafe32
 
5f3f611
e4f959c
 
 
 
 
 
5f3f611
e4f959c
 
aaafe32
 
 
e4f959c
5f3f611
e4f959c
 
 
 
 
 
 
 
aaafe32
 
e4f959c
 
 
 
 
aaafe32
e4f959c
 
 
 
 
 
aaafe32
 
 
 
 
 
 
 
 
 
 
 
e4f959c
 
 
aaafe32
 
 
 
 
 
 
 
 
 
 
e4f959c
 
 
 
aaafe32
e4f959c
 
aaafe32
 
 
e4f959c
aaafe32
e4f959c
aaafe32
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
---
license: apache-2.0
library_name: pytorch
pipeline_tag: text-to-video
tags:
  - long-video-generation
  - autoregressive
  - retrieval-augmented-generation
  - video-generation
  - wan
  - longlive
  - arxiv:2606.02553
language:
  - en
---

# LongLive-RAG β€” Checkpoints & Toy Data

This repository hosts the model checkpoints, prompt files, and a toy latent set for  
**LongLive-RAG: A General Retrieval-Augmented Framework for Long Video Generation**.

- πŸ“„ **Paper:** https://arxiv.org/abs/2606.02553
- πŸ€— **HF Paper Page:** https://huggingface.co/papers/2606.02553
- πŸ’» **Code:** https://github.com/qixinhu11/LongLive-RAG
- πŸ” **TL;DR:** LongLive-RAG turns long video generation into a *retrieval problem*. An
  autoregressive (AR) video generator looks back over the video it has *already* generated
  and retrieves the most relevant past latents as additional context β€” reducing error
  accumulation, identity drift, and background flicker over long horizons, **without
  retraining the base generator**.

## What's in here

```text
checkpoints/
β”œβ”€β”€ causal_forcing.pt              # Causal-Forcing AR backbone
β”œβ”€β”€ self_forcing.pt                # Self-Forcing AR backbone
β”œβ”€β”€ longlive_base.pt               # LongLive AR backbone
β”œβ”€β”€ longlive_lora.pt               # LongLive LoRA, paired with longlive_base.pt
β”œβ”€β”€ ae_latent_mem.pt               # Retrieval autoencoder, default for inference
β”œβ”€β”€ moviegenbench_128_refined.txt  # 128 MovieGenBench prompts
└── vidprom_filtered_extended.txt  # Self-Forcing prompt pool for generate_latent.py

toydatasets/
└── latent_0000xx.pt               # Tiny example latent set for the training demo
```

- **AR backbones** β€” `causal_forcing.pt`, `self_forcing.pt`, and
  `longlive_base.pt` + `longlive_lora.pt` β€” are the frozen base generators that
  LongLive-RAG plugs into.
- **`ae_latent_mem.pt`** is the trainable retrieval encoder, implemented as a small latent
  autoencoder. This is the only component LongLive-RAG trains.
- **`toydatasets/`** contains a tiny set of clean latent blocks for smoke-testing the
  autoencoder training pipeline end-to-end.

> The base **WAN VAE** (`Wan-AI/Wan2.1-T2V-1.3B`) that LongLive-RAG operates in the latent
> space of is **not** included here. Please download it separately, as described below.

## Download

Everything restores into the expected layout of the code repository. Run the following
commands from the root of your local
[LongLive-RAG](https://github.com/qixinhu11/LongLive-RAG) checkout:

```bash
# Base WAN VAE β€” LongLive-RAG operates in its latent space
hf download Wan-AI/Wan2.1-T2V-1.3B --local-dir wan_models/Wan2.1-T2V-1.3B

# All LongLive-RAG assets β€” restores checkpoints/ and toydatasets/ in place
hf download qixinhu11/LongLive-RAG --local-dir . --include "checkpoints/*" "toydatasets/*"
```

The `--include` filter pulls only `checkpoints/` and `toydatasets/`, so it will not overwrite
your local `README.md`. Older setups can replace `hf download` with
`huggingface-cli download` using the same arguments.

To pull a single file instead:

```bash
hf download qixinhu11/LongLive-RAG checkpoints/ae_latent_mem.pt --local-dir .
```

## Usage

Clone the [code repository](https://github.com/qixinhu11/LongLive-RAG), download the assets
above, then run the shipped 3 Γ— 2 grid, covering three AR backbones and two context-assembly
methods:

```bash
# Main result: LongLive backbone + LongLive-RAG retrieval
bash inference.sh longlive latentmem

# Baseline: native sliding-window context
bash inference.sh causal_forcing native
```

See the [GitHub README](https://github.com/qixinhu11/LongLive-RAG) for full installation,
inference, and training instructions.

## Paper

LongLive-RAG is described in the following paper:

**LongLive-RAG: A General Retrieval-Augmented Framework for Long Video Generation**  
Qixin Hu, Shuai Yang, Wei Huang, Song Han, Yukang Chen

- arXiv: https://arxiv.org/abs/2606.02553
- Hugging Face Papers: https://huggingface.co/papers/2606.02553

If you find this repository useful, please cite our paper.

## License

Released under the [Apache 2.0](https://github.com/qixinhu11/LongLive-RAG/blob/main/LICENSE)
license.

The included AR backbones and WAN VAE latent space derive from their respective upstream
projects:

- [LongLive](https://github.com/NVlabs/LongLive)
- [Self-Forcing](https://github.com/guandeh17/Self-Forcing)
- [Causal-Forcing](https://github.com/thu-ml/Causal-Forcing)
- [Wan](https://github.com/Wan-Video/Wan2.1)

Please also respect the original licenses of these upstream projects.

## Citation

```bibtex
@article{hu2026longliverag,
  title         = {LongLive-RAG: A General Retrieval-Augmented Framework for Long Video Generation},
  author        = {Hu, Qixin and Yang, Shuai and Huang, Wei and Han, Song and Chen, Yukang},
  journal       = {arXiv preprint arXiv:2606.02553},
  year          = {2026},
  eprint        = {2606.02553},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV}
}
```