Skip to content

[diffusion] Keep LongLive2 components resident on large GPUs - #35993

Merged
BBuf merged 1 commit into
mainfrom
bbuf/longlive2-high-memory-residency
Aug 24, 2026
Merged

BBuf merged 1 commit into
mainfrom
bbuf/longlive2-high-memory-residency

Conversation

@BBuf

@BBuf BBuf commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Motivation

LongLive2 inherits the Wan memory defaults, which layerwise-offload the text encoder and VAE even when a large GPU has enough memory to keep the full pipeline resident. On H200 this adds roughly 280 ms of host/device traffic to every request.

Changes

  • Keep the LongLive2 DiT, text encoder, and VAE resident when at least 60 GiB is available.
  • Preserve the current layerwise-offload path on smaller GPUs.
  • Add coverage for both memory-policy branches and document the H200 behavior.

H200 benchmark

Base: 3c69a4c744525be0146629fc5933e3ddab609fb2
Model: Rabinovich/LongLive-2.0-5B-Diffusers
Shape: 832x480, 61 frames, 4 steps, seed 42
Prompt: A curious raccoon
Method: fresh process per sample, request warmup, ABBA order, two measured samples per variant

Quality Metric Main PR Change
lossless Denoise 0.5630 s 0.5653 s +0.40%
lossless End-to-end 2.1594 s 1.8766 s -13.10%
high Denoise 0.5620 s 0.5635 s +0.27%
high End-to-end 1.9162 s 1.6508 s -13.85%
lossless Peak reserved 24.18 GiB 44.17 GiB +19.99 GiB
high Peak reserved 23.68 GiB 43.85 GiB +20.17 GiB

The high-quality profile reduced GPU memcpy time from about 617 ms to 6.7 ms. Denoise time is unchanged; the gain comes from removing repeated encoder/VAE transfers.

Output check

Main and PR videos are byte-identical in every repeated run:

  • lossless SHA256: 0f57a6ddd031773cea922d0b36bec3f436b1096a2432eee81a1cce53c67524ea
  • high SHA256: 344b36d477d62891c28bb1777c54743955accaa41f10336b31a2c119b6a7eebf

Tests

  • pytest -q python/sglang/multimodal_gen/test/unit/test_server_args.py -k 'pipeline_configs_declare_auto_tune_hints or longlive_residency_scales_with_available_memory'
  • pytest -q python/sglang/multimodal_gen/test/unit/test_longlive2_pipeline_config.py
  • pre-commit run --files docs/cookbook/diffusion/LongLive/LongLive-2.0.mdx python/sglang/multimodal_gen/configs/pipeline_configs/longlive2.py python/sglang/multimodal_gen/test/unit/test_server_args.py

The combined unit files report 180 passed plus 48 subtests and one unrelated LTX2 device-mode failure. The same failure reproduces on the base commit on H200.


CI States

Latest PR Test (Base): ✅ Run #32644662988
Latest PR Test (Extra): ✅ Run #32651539133
Latest PR Test (AMD ROCm 7.2): ⏳ Run #32644662882

@mintlify

mintlify Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lmsysorg 🟢 Ready View Preview Aug 22, 2026, 3:16 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@BBuf

BBuf commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci extra

@BBuf
BBuf force-pushed the bbuf/longlive2-high-memory-residency branch from fdc114c to 9d3ecd7 Compare August 23, 2026 14:11
@BBuf BBuf added the mergeable label Aug 23, 2026
@BBuf
BBuf merged commit 09592f5 into main Aug 24, 2026
159 of 168 checks passed
@BBuf
BBuf deleted the bbuf/longlive2-high-memory-residency branch August 24, 2026 04:06
longxin9715 added a commit to longxin9715/sglang that referenced this pull request Aug 24, 2026
…n-transport1

* 'main' of https://github.com/sgl-project/sglang: (326 commits)
  [diffusion] feat: cache LoRA-merged weights in files the page cache can hold (sgl-project#36062)
  [diffusion] Speed up LingBot high-quality VAE decode (sgl-project#36024)
  [diffusion] Honor XDG cache for model overlays (sgl-project#36019)
  Support streaming session on NPU (sgl-project#32597)
  fix(xpu): read enable_deterministic_inference from the config bag (sgl-project#36149)
  xeon ci fail fast strategy change (sgl-project#36146)
  [diffusion] Fix Hunyuan QKV pack indexing at production video shapes (sgl-project#36009)
  [diffusion] Refresh quality and BCG benchmark skills (sgl-project#36016)
  [MoE] Gather the cutlass MoE activation and its scales in one launch (sgl-project#34915)
  [diffusion] feat: add plain component weight overrides (sgl-project#36086)
  [diffusion] feat: support loading mixed w4a8 text encoders (sgl-project#36037)
  [diffusion] Default Hunyuan VAE to tiled decode (sgl-project#36012)
  fix(xpu): enable compressed-tensors FP8 W8A8 on XPU (RedHatAI FP8-dynamic models) (sgl-project#33057)
  chore: move cuda_vmm_utils.py under srt/utils/ (sgl-project#36053)
  [Intel XPU] Add xpu pass for biased_topk and hash_topk (sgl-project#33323)
  [CPU] Fix NUMA/core binding for DP ranks (sgl-project#32856)
  [Fix] Harden FlashAttention CUDA graph metadata bounds (sgl-project#35454)
  [XPU] Use a fused GDN kernel from sgl-kernel for Qwen3.5 (sgl-project#33354)
  [diffusion] Fuse LongCat-Image QKNorm and interleaved RoPE (sgl-project#35995)
  [diffusion] Keep LongLive2 components resident on large GPUs (sgl-project#35993)
  ...

# Conflicts:
#	python/sglang/srt/multimodal/processors/base_processor.py
#	python/sglang/srt/server_args.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bypass-fastfail diffusion SGLang Diffusion documentation Improvements or additions to documentation mergeable run-ci run-ci-extra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant