Skip to main content
Sequence parallelism splits long image or video latent sequences across GPUs. In SGLang Diffusion, the public controls are:
  • --sp-degree: total sequence parallel degree
  • --ulysses-degree: Ulysses parallel degree
  • --ring-degree: ring parallel degree
The degrees must satisfy:
Use SP when sequence length or video shape makes the DiT forward pass the bottleneck and the model supports sequence sharding. For latency-oriented multi-GPU Qwen/Wan deployments, also compare against CFG parallelism and FSDP; SP is not automatically the best multi-GPU setting for every model.

Two-GPU Sequence Parallelism

This example uses two GPUs with sp=2, ulysses=1, and ring=2.

Single-GPU Baseline

Use an explicit single-GPU baseline before attributing a gain to sequence parallelism.

Choosing The Degrees

SettingTypical useNotes
—sp-degree 1Single-GPU or no sequence splittingUse this as the baseline.
—ulysses-degree NUlysses-only sequence parallelismWhen ring parallelism is not needed, keep —ring-degree 1.
—ring-degree NRing-based sequence splitting over long sequencesKeep —sp-degree equal to ulysses_degree * ring_degree.

Benchmarking Guidance

When benchmarking SP, compare the same model, precision, resolution, frame count, step count, scheduler settings, prompt type, and output path. Report both stage latency and peak GPU memory; SP can reduce per-GPU memory while adding communication overhead. Useful metrics:
  • End-to-end latency
  • Denoising stage latency
  • Decoding stage latency
  • Peak GPU memory and peak allocated memory
  • Communication or runtime overhead when available

Reference Benchmark

The following numbers are a reference measurement for one setup. They are not a general promise for all Wan2.2 deployments.
  • Model: Wan-AI/Wan2.2-TI2V-5B-Diffusers
  • Hardware: two 48 GB RTX 40-series GPUs for sequence parallelism, one 48 GB RTX 40-series GPU for baseline
  • Sequence parallel config: sp=2, ulysses=1, ring=2 (u1r2)
  • Baseline config: sp=1, ulysses=1, ring=1 (u1r1)

Stage Time Breakdown

Stage / Metricu1r2 (s)u1r1 baseline (s)Speedup
InputValidation0.10600.10290.97x
TextEncoding1.39652.22611.59x
LatentPreparation0.00020.00021.00x
TimestepPreparation0.00030.00041.33x
Denoising52.635871.67851.36x
Decoding7.670813.43141.75x
Total63.7490.631.42x

Memory Usage

Memory Metricu1r2 (GB)u1r1 baseline (GB)Delta
Peak GPU Memory20.0727.40-7.33
Peak Allocated13.3520.40-7.05
Memory Overhead6.727.00-0.28
Overhead Ratio33.5%25.6%+7.9pp
In this setup, end-to-end latency improved from 90.63s to 63.74s (1.42x) and peak GPU memory dropped by 7.33GB. The overhead ratio increased, so future tuning should still check communication and runtime overhead on the target hardware.