Skip to content

Commit 286408b

Browse files
committed
[docs]: treat Spark pair height/width/frames as examples, not a locked recipe
Record the 512x896 1-GPU and dual-Spark medians we measured, and note native 480p is 480x832. Geometry stays a CLI/YAML knob.
1 parent b046e14 commit 286408b

4 files changed

Lines changed: 60 additions & 28 deletions

File tree

docs/assets/cookbook-recipes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@
657657
"evidence": "Verified",
658658
"expected_artifact": "MP4 under outputs/fasth3_spark_pair/",
659659
"modes": ["T2VA", "2-Spark SP"],
660-
"limitations": ["Requires a two-node Ray cluster on the QSFP interconnect. See docs/getting_started/installation/spark_pair.md."]
660+
"limitations": ["Requires a two-node Ray cluster on the QSFP interconnect. Height, width, frames, and steps in the YAML are examples. Edit them or pass CLI flags. See docs/getting_started/installation/spark_pair.md."]
661661
},
662662
{
663663
"id": "matrix-game-2",

docs/getting_started/installation/spark_pair.md

Lines changed: 51 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ xDiT vendor. Do not install xDiT for this path.
1313

1414
| Goal | How | Use two Sparks? |
1515
|---|---|---|
16-
| Two independent videos at once | One process per box, `num_gpus=1` | Throughput only. Each clip still takes ~6 min. |
17-
| One clip, faster | Ray + `sp_size=2` + parallel VAE | **Yes.** Measured 292 s vs 374 s on the same 124-frame FastH3 recipe. |
18-
| One clip, longer | Same, more frames | **Yes.** 345 frames (~14.4 s at 24 fps) finished in 587 s. |
16+
| Two independent videos at once | One process per box, `num_gpus=1` | Throughput only. Each clip still takes the 1-GPU time for that size. |
17+
| One clip, faster | Ray + `sp_size=2` + parallel VAE | **Yes.** One 768×1344×124 recipe was 292 s vs 374 s on one GB10. |
18+
| One clip, longer | Same, more frames | **Yes.** 345 frames (~14.4 s at 24 fps) finished in 587 s at 768×1344. |
1919

2020
Sequence parallel **replicates** the DiT (~66 GiB per node). Sequential load
2121
and lazy module load are still required on each box. FSDP would shard weights;
@@ -71,10 +71,11 @@ On **both** nodes, from the FastVideo repo, with the venv active:
7171
source examples/inference/optimizations/spark_pair_env.sh
7272
```
7373

74-
That script pins NCCL to the QSFP NIC/HCA, disables NVLink-style P2P (there is
75-
none between boxes), and turns off Ray's memory monitor. The monitor treats
76-
GB10 unified RSS during a 14-shard DiT load as a runaway and SIGTERMs the
77-
worker around shard 11/14.
74+
That script pins NCCL and Gloo to the QSFP NIC/HCA, disables NVLink-style P2P
75+
(there is none between boxes), and turns off Ray's memory monitor. The monitor
76+
treats GB10 unified RSS during a 14-shard DiT load as a runaway and SIGTERMs
77+
the worker around shard 11/14. Override `NCCL_SOCKET_IFNAME` /
78+
`GLOO_SOCKET_IFNAME` if `ibdev2netdev` shows a different name.
7879

7980
Cap Ray's object store. The default (~30% of 128 GB) leaves too little room
8081
for the DiT:
@@ -99,7 +100,22 @@ Check `ray status` on the head: `0.0/2.0 GPU` idle.
99100

100101
## 3. Generate one FastH3 clip on both GPUs
101102

102-
Run the driver on the **head**, same venv, same QSFP IP:
103+
Run the driver on the **head**, same venv, same QSFP IP.
104+
105+
`basic_fasth3.py` defaults target a four-GPU GB200 profile: 768×1344, `sm100a`
106+
VSA, FA4, four GPUs. On Sparks you must override the kernel flags. Height,
107+
width, frames, steps, seed, and prompt are yours. Change them. Legal
108+
`num_frames` values are `17n+5`, capped at 345.
109+
110+
GB10 has no FA4 / sm_100a VSA kernel, so `--vsa-kernel triton --no-fa4` stays
111+
required on this box. `--execution-backend ray` is optional when `RAY_ADDRESS`
112+
is already set.
113+
114+
`--warmup --repeats 3` prints a median of three `generate()` calls after an
115+
excluded warmup. Sequential load reloads Qwen for each later request, so that
116+
protocol works. For a single cold process, pass `--no-warmup --repeats 1`.
117+
118+
The command below is one example, not a required recipe:
103119

104120
```bash
105121
source examples/inference/optimizations/spark_pair_env.sh
@@ -110,18 +126,15 @@ python examples/inference/basic/basic_fasth3.py \
110126
--model-path FastVideo/FastVideo-FastH3-4-step-Preview-v1-VSA-DataFree \
111127
--num-gpus 2 --execution-backend ray \
112128
--vsa-kernel triton --no-fa4 \
113-
--repeats 1 --no-warmup --parallel-vae \
129+
--warmup --repeats 3 --parallel-vae \
114130
--height 768 --width 1344 --num-frames 124 --steps 5 \
115131
--seed 2026 \
116132
--prompt "A wide cinematic shot of an alpine meadow at sunrise, pale pink mountain peaks above a blue valley filled with thin morning mist." \
117133
--output outputs/fasth3_spark_pair
118134
```
119135

120-
`--execution-backend ray` is optional when `RAY_ADDRESS` is already set;
121-
`basic_fasth3.py` selects Ray in that case. GB10 has no FA4 / sm_100a VSA
122-
kernel, so `--vsa-kernel triton --no-fa4` is required.
123-
124-
Config-first equivalent:
136+
Config-first equivalent. Edit the YAML the same way, `request.sampling` is not
137+
locked:
125138

126139
```bash
127140
FASTVIDEO_VSA_SM100A=0 FASTVIDEO_FA4=0 \
@@ -140,22 +153,35 @@ clips longer than **15 s**. The longest legal length is **345 frames**
140153

141154
## Measured on two GB10s (2026-08-31)
142155

143-
Same alpine prompt, 768×1344, 5 sigma points (4 DiT forwards), Triton VSA,
144-
sequential + lazy load (auto on GB10), parallel VAE, cold process (no warmup).
145-
Denoise times include deferred DiT load (~35 s).
156+
These rows are full H3 VAE decode, Triton VSA, sequential + lazy load (auto on
157+
GB10), parallel VAE. They are not a required size. Denoise times include
158+
deferred DiT load (~35 s on the first generate).
159+
160+
Cold process, `--no-warmup --repeats 1`, alpine prompt, 768×1344, 5 sigma
161+
points (4 DiT forwards):
146162

147163
| Run | GPUs | Frames | E2E | Denoise | VAE decode |
148164
|---|---:|---:|---:|---:|---:|
149165
| One Spark | 1 | 124 | 374–393 s | 180–188 s | 151–156 s |
150166
| Two Sparks, SP=2 | 2 | 124 | **292 s** | **122 s** | **102 s** |
151167
| Two Sparks, SP=2 | 2 | 345 | **587 s** | **351 s** | **173 s** |
152168

153-
The ~330 s one-Spark number from earlier FastH3 bring-up is the same recipe
154-
without this pair path and without TAEH3. 292 s is faster than that 1-GPU
155-
clip. It is **not** a lower bound: the first decode pays `torch.compile` on
156-
the VAE (~1 min of the 102 s); a second `generate()` in the same workers is
157-
cheaper. TAEH3 preview decode ([#1795](https://github.com/hao-ai-lab/FastVideo/pull/1795))
158-
is a separate opt-in and was not used here.
169+
Warmup excluded, `--warmup --repeats 3` median, 512×896, 5 sigma points, full
170+
VAE, same 4-step schedule:
171+
172+
| Run | GPUs | Frames | Median E2E | Median denoise |
173+
|---|---:|---:|---:|---:|
174+
| One Spark | 1 | 124 | **251.4 s** | 94.2 s |
175+
| Two Sparks, SP=2 | 2 | 124 | **215.2 s** | 72.4 s |
176+
177+
Those medians used `--height` / `--width` / `--num-frames` as CLI flags. Swap
178+
them. Native 480p on this model is 480×832, 124 frames. The 15 s cap is 345
179+
frames.
180+
181+
The first VAE decode still pays `torch.compile`. Later `generate()` calls in
182+
the same workers are cheaper. GB10 regional DiT compile stays off because the
183+
sm_100a VSA kernel is not on this chip, so denoise is slower than a GB200
184+
`sm100a` run at the same geometry.
159185

160186
## Troubleshooting
161187

@@ -165,6 +191,8 @@ is a separate opt-in and was not used here.
165191
| `RayDistributedExecutor` TypeError / abstract `set_log_queue` | Use a FastVideo build that implements those methods on the Ray executor (this page). |
166192
| Worker SIGTERM during DiT shard 11/14 | `RAY_memory_monitor_refresh_ms=0` **before** `ray start`. Do not leave Ray's default 30% object store. |
167193
| NCCL hangs or uses Wi-Fi | `source spark_pair_env.sh`. Confirm `NCCL_SOCKET_IFNAME` is the QSFP NIC. |
194+
| Gloo `connectFullMesh` / `remote=[127.0.0.1]` | Two 1-GPU nodes must not use loopback as the Gloo store. Source `spark_pair_env.sh` so `GLOO_SOCKET_IFNAME` is the QSFP NIC. Use a FastVideo build that keys loopback on unique worker IPs. |
195+
| Second `generate()` crashes `NoneType.parameters` | Sequential load used to drop the text encoder without reloading it. This branch reloads Qwen for later requests so `--warmup --repeats N` works. |
168196
| OOM / `earlyoom` prefers Python | Sequential load and lazy module load must stay on (do not pass `--no-h3-sequential-load` or `--no-lazy-module-load`). Peak GPU during 345-frame denoise is ~90 GiB/node. |
169197
| `num_gpus=2` on one Spark | Each Spark has one GPU. Use Ray across two nodes, or `num_gpus=1` on one box. |
170198

docs/getting_started/installation/spark_performance.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ is power-cycled. To avoid it:
174174
from checkpoint `config.json`, not live weights. See
175175
[Offloading](../../inference/offloading.md).
176176
- **Two Sparks, one clip.** Sequence parallel (`sp_size=2`) over the QSFP RoCE
177-
link ran the same 768×1344×124 FastH3 recipe in **292 s** vs **374–393 s** on
178-
one GB10, and a 345-frame (~14.4 s) clip in **587 s**. Weights stay replicated,
179-
so sequential load and lazy module load are still required on each box.
180-
Bring-up, env vars, and the cookbook recipe:
177+
link ran one 768×1344×124 FastH3 recipe in **292 s** vs **374–393 s** on
178+
one GB10, and a 345-frame (~14.4 s) clip in **587 s**. Other heights, widths,
179+
and frame counts are valid. Weights stay replicated, so sequential load and
180+
lazy module load are still required on each box. Bring-up and knobs:
181181
[Pair two NVIDIA DGX Sparks](spark_pair.md).
182182

183183
## Gotchas specific to the GB10

examples/inference/basic/basic_fasth3_spark_pair.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# FastH3 on two DGX Sparks (one GPU each) over QSFP RoCE.
22
# Bring up the Ray cluster first: docs/getting_started/installation/spark_pair.md
33
#
4+
# request.sampling below is an example, not a required recipe. Change height,
5+
# width, num_frames, num_inference_steps, seed, and prompt. Legal H3 frame
6+
# counts are 17n+5, max 345 (15 s).
7+
#
48
# source examples/inference/optimizations/spark_pair_env.sh
59
# export RAY_ADDRESS=<qsfp-head>:6379
610
# export FASTVIDEO_HOST_IP=<qsfp-head>

0 commit comments

Comments
 (0)