hudabey commited on
Commit
d726608
·
verified ·
1 Parent(s): 3ee9a93

Add model card

Browse files
Files changed (1) hide show
  1. README.md +268 -0
README.md ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: apache-2.0-and-cc-by-nc-sa-4.0
4
+ license_link: https://github.com/statite-ai/SpecAR#license
5
+ pipeline_tag: text-to-video
6
+ tags:
7
+ - video-generation
8
+ - autoregressive
9
+ - speculative-decoding
10
+ - inference-acceleration
11
+ - training-free
12
+ - text-to-video
13
+ - image-to-video
14
+ - video-to-video
15
+ - krea
16
+ - helios
17
+ - comfyui
18
+ base_model:
19
+ - krea/krea-realtime-video
20
+ - gdhe17/Self-Forcing
21
+ - BestWishYsh/Helios-Base
22
+ - BestWishYsh/Helios-Distilled
23
+ ---
24
+
25
+ # SpecAR: Distributed Target Blocks for Fast Autoregressive Video Generation
26
+
27
+ **Up to 10.54× faster autoregressive video generation, without retraining or auxiliary reward models.**
28
+
29
+ SpecAR is a training-free inference method for accelerating autoregressive video generation. Instead of invoking a large target model for every video block, SpecAR assigns most blocks to a smaller drafter and distributes a limited number of target-generated blocks evenly across the video.
30
+
31
+ This eliminates online perceptual routing and its associated scoring overhead, while controlling the longest uninterrupted sequence of drafted blocks.
32
+
33
+ SpecAR supports **text-to-video, image-to-video, and video-to-video generation** on Krea Realtime 14B, with a single implementation supporting NVIDIA Hopper and Blackwell GPUs.
34
+
35
+ **[Project Page](https://statite.ai/specar) · [Paper](https://statite.ai/specar/specar.pdf) · [GitHub](https://github.com/statite-ai/SpecAR) · [ComfyUI](https://github.com/statite-ai/ComfyUI-SpecAR)**
36
+
37
+ ![SpecAR speed comparison on Krea Realtime 14B](https://raw.githubusercontent.com/statite-ai/SpecAR/main/assets/race.webp)
38
+
39
+ *Generation comparison on Krea Realtime 14B using one NVIDIA H100. The methods generate the same video duration from the same prompt and seed. Reported latencies come from the paper's evaluation.*
40
+
41
+ ## Performance
42
+
43
+ ### H100: Published evaluation
44
+
45
+ SpecAR was evaluated on Krea Realtime 14B and Helios 14B using a single NVIDIA H100 80GB per model pair.
46
+
47
+ | Model | Speedup over target-only | GPU |
48
+ |---|---:|---|
49
+ | Krea Realtime 14B | **Up to 2.67×** | 1× H100 |
50
+ | Helios-Base 14B | **Up to 10.54×** | 1× H100 |
51
+
52
+ For Krea Realtime 14B, generating a 26.6-second video:
53
+
54
+ | Method | Mean latency | Speedup |
55
+ |---|---:|---:|
56
+ | Target-only | 87.6 s | 1.00× |
57
+ | SDVG, operating point for k=2 | 56.8 s | 1.54× |
58
+ | **SpecAR, k=2** | **32.8 s** | **2.67×** |
59
+ | SpecAR, k=5 | 39.0 s | 2.25× |
60
+ | SpecAR, k=7 | 42.9 s | 2.04× |
61
+
62
+ These results use 36-block rollouts at 832×480 resolution, BF16 precision, five denoising steps and FlashAttention-3.
63
+
64
+ At k=7, SpecAR retains **99.7% of target-only Restricted VBench Quality-6**, while generating 2.04× faster than target-only inference.
65
+
66
+ Across the evaluated operating points on Krea Realtime and Helios, SpecAR also achieves lower latency and matching or higher measured VisionReward and Restricted VBench Quality-6 than SDVG.
67
+
68
+ ### B200: Blackwell execution
69
+
70
+ The same SpecAR Krea implementation supports NVIDIA B200 GPUs through automatic FlashAttention-4 selection. No separate Blackwell implementation or model conversion is required.
71
+
72
+ In an engineering validation using a 26.6-second coral-reef generation at k=7:
73
+
74
+ | GPU | Attention backend | Reported generation time |
75
+ |---|---|---:|
76
+ | NVIDIA H100 | FlashAttention-3 | 37.9 s |
77
+ | **NVIDIA B200** | **FlashAttention-4** | **25.8 s** |
78
+
79
+ The B200 run completed the 26.6-second video in less than its playback duration.
80
+
81
+ *These are single-video engineering measurements, not the mean end-to-end results from the paper. They do not establish a B200 speedup over Krea's optimized target-only B200 implementation. Hardware, kernel and workload settings affect the results.*
82
+
83
+ ## Supported models
84
+
85
+ SpecAR uses existing publicly released model weights. **No training or new checkpoint is required.**
86
+
87
+ | Backbone | Target | Drafter |
88
+ |---|---|---|
89
+ | `krea` | [Krea Realtime 14B](https://huggingface.co/krea/krea-realtime-video) | [Self-Forcing 1.3B DMD](https://huggingface.co/gdhe17/Self-Forcing) |
90
+ | `helios` | [Helios-Base 14B](https://huggingface.co/BestWishYsh/Helios-Base) | [Helios-Distilled 14B](https://huggingface.co/BestWishYsh/Helios-Distilled) |
91
+
92
+ ### Hardware compatibility
93
+
94
+ | GPU | Krea | Helios | Attention |
95
+ |---|---|---|---|
96
+ | H100 | Supported | Supported | FA3 |
97
+ | H200 | Supported | Supported | FA3 |
98
+ | B200 | Supported | Not yet supported | FA4 |
99
+
100
+ SpecAR automatically selects a compatible attention backend on supported hardware. The inference algorithm, installation procedure and CLI remain the same across Hopper and Blackwell.
101
+
102
+ ## Installation
103
+
104
+ Requires Linux, Python 3.11, a compatible NVIDIA GPU and a CUDA 12.8-compatible driver.
105
+
106
+ ### Krea Realtime 14B
107
+
108
+ ```bash
109
+ git clone https://github.com/statite-ai/SpecAR
110
+ cd SpecAR
111
+
112
+ python3.11 -m venv .venv-krea
113
+ source .venv-krea/bin/activate
114
+
115
+ pip install ".[krea]"
116
+ specar download --backbone krea
117
+ ```
118
+
119
+ The Krea setup downloads approximately 50 GB of public model files, including the Krea Realtime 14B target, Self-Forcing 1.3B drafter, text encoder and VAE.
120
+
121
+ The same installation works on H100 and B200. SpecAR automatically uses FA3 on Hopper and FA4 on Blackwell.
122
+
123
+ On shared GPU machines, running `hf auth login` before downloading can help avoid anonymous Hugging Face rate limits.
124
+
125
+ ## Generate with SpecAR
126
+
127
+ ### 1. Text-to-video
128
+
129
+ Generate video directly from a text prompt.
130
+
131
+ ```bash
132
+ specar generate --backbone krea \
133
+ --prompt "A papercraft coral reef full of colorful fish" \
134
+ --k 2 \
135
+ --out reef.mp4
136
+ ```
137
+
138
+ By default, SpecAR generates 36 blocks, producing approximately 26.6 seconds of video at 16 FPS.
139
+
140
+ ### 2. Image-to-video
141
+
142
+ Generate a video conditioned on an input image.
143
+
144
+ ```bash
145
+ specar generate --backbone krea \
146
+ --image photo.jpg \
147
+ --prompt "A cinematic mountain landscape at sunrise" \
148
+ --k 7 \
149
+ --out video.mp4
150
+ ```
151
+
152
+ The image is resized to the model's 832×480 resolution and used as the initial visual context.
153
+
154
+ ### 3. Video-to-video
155
+
156
+ Generate a video conditioned on an existing clip.
157
+
158
+ ```bash
159
+ specar generate --backbone krea \
160
+ --video input.mp4 \
161
+ --prompt "A futuristic city at night" \
162
+ --strength 0.8 \
163
+ --k 7 \
164
+ --out transformed.mp4
165
+ ```
166
+
167
+ The `--strength` parameter controls the degree of transformation relative to the input video. The source video's duration limits the output length.
168
+
169
+ ### Generation controls
170
+
171
+ | Parameter | Description |
172
+ |---|---|
173
+ | `--k` | Number of blocks generated by the target |
174
+ | `--blocks` | Total autoregressive blocks |
175
+ | `--seconds` | Requested video duration |
176
+ | `--seed` | Random seed |
177
+ | `--steps` | Krea denoising steps per block |
178
+ | `--attention` | `auto`, `fa2`, `fa3`, or `fa4` |
179
+ | `--image` | Initial image for image-to-video |
180
+ | `--video` | Input clip for video-to-video |
181
+ | `--strength` | Video-to-video transformation strength |
182
+ | `--save-latents` | Save generated latent tensors |
183
+
184
+ The default target budget is k=7. Lower values generally favor speed, while increasing the target budget changes the quality–latency trade-off.
185
+
186
+ For all options and sample outputs, see the [SpecAR GitHub repository](https://github.com/statite-ai/SpecAR).
187
+
188
+ ## ComfyUI
189
+
190
+ SpecAR is also available as a ComfyUI custom-node integration for Krea Realtime 14B.
191
+
192
+ **[ComfyUI-SpecAR — Installation, Nodes and Workflows](https://github.com/statite-ai/ComfyUI-SpecAR)**
193
+
194
+ The ComfyUI integration uses the same SpecAR inference engine rather than a separate implementation of the decoding algorithm.
195
+
196
+ See the custom-node repository for its installation requirements and supported workflows.
197
+
198
+ ## How it works
199
+
200
+ SpecAR treats the placement of expensive target-model executions as a scheduling problem.
201
+
202
+ Given a video of H autoregressive blocks and a target budget k, it selects target positions according to
203
+
204
+ $$
205
+ \mathcal{A}_k =
206
+ \left\{
207
+ \left\lfloor \frac{jH}{k}+\frac{1}{2}\right\rfloor
208
+ \;\middle|\;
209
+ j=0,\ldots,k-1
210
+ \right\}.
211
+ $$
212
+
213
+ The target generates the blocks at these positions. The drafter generates all remaining blocks.
214
+
215
+ The resulting schedule minimizes the longest uninterrupted draft run for the specified target budget, with the first block assigned to the target.
216
+
217
+ Unlike online perceptual routing, SpecAR requires:
218
+
219
+ - No additional training.
220
+ - No learned router or reward model.
221
+ - No per-block perceptual scoring.
222
+ - No discarded draft candidate at a predetermined target position.
223
+
224
+ Both models operate on the same committed video trajectory. Model-specific KV caches are reconstructed from the committed context as required.
225
+
226
+ SpecAR is an approximate decoder: the scheduling guarantee does not guarantee identical target-model outputs or preservation of the target distribution.
227
+
228
+ ## Reproducibility
229
+
230
+ The repository provides benchmark commands and reference latent hashes for reproducing the original H100 experiments.
231
+
232
+ ```bash
233
+ specar-benchmark --backbone krea --weights weights
234
+ ```
235
+
236
+ On the reference Hopper configuration with FlashAttention-3 and five denoising steps, the benchmark checks generated latents against the published SHA-256 hashes.
237
+
238
+ Different attention kernels and GPU architectures can produce numerically different outputs. On other supported configurations, the benchmark records execution times and output hashes without requiring bitwise identity with the H100 reference.
239
+
240
+ See the [repository documentation](https://github.com/statite-ai/SpecAR) for pinned dependencies, benchmark settings and Helios setup.
241
+
242
+ ## Citation
243
+
244
+ ```bibtex
245
+ @misc{hassan2026specar,
246
+ title = {SpecAR: Distributed Target Blocks for Fast Autoregressive Video Generation},
247
+ author = {Hassan, Hudeifa},
248
+ year = {2026},
249
+ note = {Preprint},
250
+ url = {https://statite.ai/specar}
251
+ }
252
+ ```
253
+
254
+ ## License
255
+
256
+ SpecAR's original scheduling, inference utilities, CLI and benchmarking code are distributed under **Apache-2.0**.
257
+
258
+ The Krea Realtime backend incorporates code adapted from Krea's inference implementation and retains **CC BY-NC-SA 4.0** licensing, restricting commercial use. Vendored Helios components retain their respective Apache-2.0 terms.
259
+
260
+ Model weights are not redistributed. Each checkpoint remains governed by its original license.
261
+
262
+ See [LICENSE and file-level notices](https://github.com/statite-ai/SpecAR#license).
263
+
264
+ ---
265
+
266
+ Developed by **[Statite](https://statite.ai)**.
267
+
268
+ [Project Page](https://statite.ai/specar) · [Paper](https://statite.ai/specar/specar.pdf) · [Source Code](https://github.com/statite-ai/SpecAR) · [ComfyUI](https://github.com/statite-ai/ComfyUI-SpecAR)