Add four FP8 checkpoints and update inference documentation
Browse files- README.md +25 -2
- realtimewam_libero_fast_fp8.pt +3 -0
- realtimewam_libero_faster_fp8.pt +3 -0
- realtimewam_robotwin_fast_fp8.pt +3 -0
- realtimewam_robotwin_faster_fp8.pt +3 -0
README.md
CHANGED
|
@@ -89,7 +89,7 @@ huggingface-cli download lightx2v/RealtimeWAM \
|
|
| 89 |
|
| 90 |
### Inference
|
| 91 |
|
| 92 |
-
|
| 93 |
|
| 94 |
```bash
|
| 95 |
# RealtimeWAM*, based on Fast-WAM
|
|
@@ -97,19 +97,42 @@ bash scripts/realtimewam/run_libero_fastwam_i2va.sh
|
|
| 97 |
|
| 98 |
# RealtimeWAM†, based on Faster-WAM
|
| 99 |
bash scripts/realtimewam/run_libero_fasterwam_i2va.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
```
|
| 101 |
|
| 102 |
We provide example inference inputs in [`examples/realtimewam/assets/`](https://github.com/ModelTC/LightX2V/tree/main/examples/realtimewam/assets/).
|
| 103 |
|
|
|
|
|
|
|
| 104 |
The measured latency is reported in the logs under **`RealtimeWAM End-to-End Latency (Excluding Text Encoding)`**, in milliseconds. It includes VAE encoding and video/action inference, while excluding text encoding.
|
| 105 |
|
| 106 |
-
Inference latency comparisons are shown below. Speedups are relative to the original model on the same GPU. The scripts above can be used to reproduce the inference latencies reported in our paper. LightX2V achieves slightly lower latency than reported in the paper.
|
| 107 |
|
| 108 |
| GPU | Fast-WAM (ms) | RealtimeWAM<sup>*</sup> (ms) | Speedup<sup>*</sup> | Faster-WAM (ms) | RealtimeWAM<sup>†</sup> (ms) | Speedup<sup>†</sup> |
|
| 109 |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 110 |
| NVIDIA H100 | 300 | **12.2** | **24.56×** | 219 | **16.1** | **13.56×** |
|
| 111 |
| NVIDIA RTX 4090D | 481 | **27.2** | **17.68×** | 362 | **44.7** | **8.11×** |
|
| 112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
### Evaluation
|
| 114 |
|
| 115 |
#### [Optional] Prepare Benchmark Resources
|
|
|
|
| 89 |
|
| 90 |
### Inference
|
| 91 |
|
| 92 |
+
Run the following scripts for BF16 or FP8 inference with **RealtimeWAM<sup>*</sup>** and **RealtimeWAM<sup>†</sup>**.
|
| 93 |
|
| 94 |
```bash
|
| 95 |
# RealtimeWAM*, based on Fast-WAM
|
|
|
|
| 97 |
|
| 98 |
# RealtimeWAM†, based on Faster-WAM
|
| 99 |
bash scripts/realtimewam/run_libero_fasterwam_i2va.sh
|
| 100 |
+
|
| 101 |
+
# RealtimeWAM*, FP8
|
| 102 |
+
bash scripts/realtimewam/run_libero_fastwam_i2va_fp8.sh
|
| 103 |
+
|
| 104 |
+
# RealtimeWAM†, FP8
|
| 105 |
+
bash scripts/realtimewam/run_libero_fasterwam_i2va_fp8.sh
|
| 106 |
```
|
| 107 |
|
| 108 |
We provide example inference inputs in [`examples/realtimewam/assets/`](https://github.com/ModelTC/LightX2V/tree/main/examples/realtimewam/assets/).
|
| 109 |
|
| 110 |
+
#### Latency
|
| 111 |
+
|
| 112 |
The measured latency is reported in the logs under **`RealtimeWAM End-to-End Latency (Excluding Text Encoding)`**, in milliseconds. It includes VAE encoding and video/action inference, while excluding text encoding.
|
| 113 |
|
| 114 |
+
Inference latency comparisons are shown below. Speedups are relative to the original model on the same GPU. The BF16 scripts above can be used to reproduce the inference latencies reported in our paper. LightX2V achieves slightly lower latency than reported in the paper. Our FP8 inference scripts can further reduce latency.
|
| 115 |
|
| 116 |
| GPU | Fast-WAM (ms) | RealtimeWAM<sup>*</sup> (ms) | Speedup<sup>*</sup> | Faster-WAM (ms) | RealtimeWAM<sup>†</sup> (ms) | Speedup<sup>†</sup> |
|
| 117 |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 118 |
| NVIDIA H100 | 300 | **12.2** | **24.56×** | 219 | **16.1** | **13.56×** |
|
| 119 |
| NVIDIA RTX 4090D | 481 | **27.2** | **17.68×** | 362 | **44.7** | **8.11×** |
|
| 120 |
|
| 121 |
+
#### Memory
|
| 122 |
+
|
| 123 |
+
LightX2V also provides memory optimizations, including text encoder offload and FP8 quantization, to reduce GPU memory usage. The table below shows memory usage with LIBERO inputs, sampled after inference with warmup and CUDA Graph enabled. Values are in GiB and exclude initialization peaks.
|
| 124 |
+
|
| 125 |
+
| Model | Text offload | Precision | Allocated memory (GiB) | `nvidia-smi` usage (GiB) |
|
| 126 |
+
| --- | :---: | :---: | ---: | ---: |
|
| 127 |
+
| **RealtimeWAM<sup>*</sup>** | ❌ | BF16 | 23.24 | 24.84 |
|
| 128 |
+
| **RealtimeWAM<sup>*</sup>** | ✅ | BF16 | 14.97 | 16.58 |
|
| 129 |
+
| **RealtimeWAM<sup>*</sup>** | ✅ | FP8 | **9.41** | **11.01** |
|
| 130 |
+
| **RealtimeWAM<sup>†</sup>** | ❌ | BF16 | 22.38 | 24.00 |
|
| 131 |
+
| **RealtimeWAM<sup>†</sup>** | ✅ | BF16 | 14.11 | 15.74 |
|
| 132 |
+
| **RealtimeWAM<sup>†</sup>** | ✅ | FP8 | **8.98** | **10.57** |
|
| 133 |
+
|
| 134 |
+
Enable text encoder offload with `"t5_cpu_offload": true`. To load an offline FP8 checkpoint, set `"dit_quantized": true`, `"dit_quant_scheme": "fp8-sgl"`, and `"dit_quantized_ckpt"` to its `.pt` path. Weights are loaded directly in FP8. Activations are quantized dynamically during inference. Allocated memory is measured with `torch.cuda.memory_allocated()`. `nvidia-smi` usage also includes PyTorch's cached memory, CUDA contexts, and other GPU allocations.
|
| 135 |
+
|
| 136 |
### Evaluation
|
| 137 |
|
| 138 |
#### [Optional] Prepare Benchmark Resources
|
realtimewam_libero_fast_fp8.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d19761267130fab5e728e1342ffe81f0945ee6a20258eaf99d3325ff71584f6f
|
| 3 |
+
size 6136384805
|
realtimewam_libero_faster_fp8.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:13c6082dae3cff3411d6a9b8844e8fa1b4c2e189971a984ba7be606ad9791473
|
| 3 |
+
size 5672184567
|
realtimewam_robotwin_fast_fp8.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a0faf7621aba0731aeebc5ef39304d76956671f42c3268917ce96cdfa54b9be
|
| 3 |
+
size 6136467143
|
realtimewam_robotwin_faster_fp8.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f596624844596cea1f408c7d1a6d23c1b7324b92bfb2898ac69356743098573d
|
| 3 |
+
size 5672266217
|