Repository navigation
Conversation
qimcis
requested review from
AgainstEntropy,
BBuf,
HaiShaw,
JustinTong0323,
mickqian,
ping1jing2,
sogalin,
wisclmy0611,
yhyang201,
yichiche,
yingluosanqian and
zijiexia
as code owners
June 18, 2026 23:55
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Contributor
Author
|
/tag-and-rerun-ci |
This was referenced Jul 6, 2026
detain
added a commit
to detain/sglang
that referenced
this pull request
Oct 8, 2026
…28690) Squash-apply of PR sgl-project#28690 head b7db4ad (15 commits, base 2026-07-13) since the branch history is fixup-heavy and pre-dates several upstream refactors. Net feature unchanged: - scheduler: continuous batching loop, stage worker (async encode), varlen step packing, TeaCache packed plans, CFG batch folding, dynamic-cap admission; --batching-mode continuous - pipeline configs: continuous_batching_supported_tasks / supports_cfg_batch_folding / supports_varlen_step_packing capability flags, per-model opt-ins (flux/qwen/wan/zimage/ideogram/sana/ernie/ glm/stablediffusion3) - denoising: context/step-state split (prepare_denoising_context, prepare_denoising_step_state, run_single_denoising_step) so packed and unpacked paths share one step implementation - new files: runtime/managers/continuous_batching.py, continuous_stage_worker.py, pipelines_core/batched_solver.py, fallback_diagnostics.py + 3 unit tests + docs - cutedsl scale_residual kernel: normalize_packed_scale_shift for per-row packed scale/shift (file now under kernels/ops/diffusion/norm/) Conflicts resolved against the current tree: - scheduler metrics keep output-slot vocabulary and accept the PR's batch_size kwargs via an alias in _record_batch_dispatch_metrics - wan DiT forward keeps spectrum/rope_cos_sin_cache paths inside the PR's teacache_plan packed/else split; _WanGELUMLP preserved - qwen DiT keeps fused-QKV-epilogue (gated off when per-token rope positions are present) + positions threaded through fallback path - denoising keeps LiteAttention registry reset (c428f58) alongside the PR's context preparation refactor - auto_tune skips tuning in continuous mode using current enable_dit_layerwise_offload_by_default() name - docs landed under docs/docs/sglang-diffusion/ (docs_new rename)
detain
added a commit
to detain/sglang
that referenced
this pull request
Oct 8, 2026
…mixin sgl-project#28690's fake predates _init_teacache_state reading self.prefix (CFG cache separation). Amends the squash-pick 1d411e4.
detain
added a commit
to detain/sglang
that referenced
this pull request
Oct 8, 2026
Triage of the full multimodal_gen unit battery after entries 136-155: - scheduler.event_loop: the sgl-project#28690 continuous-batching guard read self.server_args unconditionally; the metrics tests drive event_loop on __new__-built schedulers. getattr-chained (real schedulers always have server_args). 8 tests restored. - test_text_encode_dp_gate: SimpleNamespace double lacked the cb_* fields _validate_batching (from sgl-project#28690) checks. 1 test restored. - test_layerwise_offload: register-time content assert predates the 09-28-merged sgl-project#40439 register-then-populate design (pre-existing failure since that merge; runtime unchanged by this batch -- the upstream test version assumes upstream manager code we don't have, so adapt in place). 2 tests restored. 227 passed across the four affected files incl. continuous-batching. Remaining battery failures are ENV: runai_model_streamer, skimage, os.memfd_create, msgpack absences + SM100-only nvfp4 kernels.
Contributor
|
Thanks @qimcis. Closing this because it has had no updates in 91 days. Reopen it if the work is still relevant. Some directories moved recently, so an older branch may need retargeting: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Add T2I continuous batching support for SGLang-Diffusion
Continuous batching lets diffusion requests join and leave the active batch mid-flight by batching compatible denoising steps across active requests, instead of only batching requests before denoising starts. This is intended to improve throughput and latency under bursty or concurrent image-generation traffic.
Modifications
Accuracy Tests
baseline:

continuous batching:

Speed Tests and Profiling
1x h100
Baseline
Dynamic batching:
Continuous batching:
After Qwen benchmark, I also ran smaller benchmarks across Qwen, FLUX2 Klein, Z-Image, SANA, ERNIE, GLM, and Ideogram to verify model compatability
Checklist
CI States
Latest PR Test (Base): ❌ Run #29277752170
Latest PR Test (Extra): ❌ Run #29277751959