Skip to content

[Diffusion] DAG-based disaggregation: replace the fixed 3-stage role orchestration with a declarative topology scheduler - #32550

Closed
niehen6174 wants to merge 14 commits into
sgl-project:mainfrom
niehen6174:feat/diffusion-dag-disagg
Closed

niehen6174 wants to merge 14 commits into
sgl-project:mainfrom
niehen6174:feat/diffusion-dag-disagg

Conversation

@niehen6174

@niehen6174 niehen6174 commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

1.1 Today: a fixed 3-stage role orchestration

The current diffusion disaggregation (#21701) hardcodes the pipeline into Encoder → Denoiser → Decoder with exactly three RoleTypes, driven by a linear state machine where a request advances along a single fixed path. This is structurally limiting in three ways:

  • No independent per-stage scaling — models with more than 3 stages must be crammed into 3 roles.
  • No conditional or parallel fan-out — the orchestrator is full of if role == ... branches.
  • Centralized, device-unaware dispatch — DiffusionServer is a single-point dispatcher with fixed pool membership.
fig-m1-baseline-vs-needs

Figure M1 — The fixed 3-stage baseline vs. the three requirements real models cannot express (fan-out/join, conditional routing, too many stages).

1.2 Real models can't be expressed

LTX-2, a realistic video/audio model, needs three things a fixed 3-stage line cannot express:

  • Dual-output fan-out + join — the denoiser latents must feed both a Video VAE and an Audio VAE simultaneously, with independent scaling per path.
  • Conditional routing — the audio branch runs only when: "generate_audio"; likewise super-resolution runs only for high-res requests (width*height > 1920*1080), otherwise the edge is pruned.
  • Too many stages — the full pipeline has ≥ 8 stages, unmaintainable when forced into 3 roles.

In short, the topology itself must become a first-class citizen — nodes, pools, and edges as declarative config, not scattered if/else.

1.3 Target topology: LTX-2 as an example

We want one declarative topology to describe the diagram below: multiple named pools, the denoiser fanning out to two VAEs (the audio branch a conditional edge), both VAEs as their own terminal sinks, with the orchestrator merging video/audio into one mp4 via ffmpeg outside the graph.

fig-m2-ltx2-topology

Figure M2 — The real LTX-2 topology: the denoiser fans out to two terminal VAEs (audio is a when: generate_audio conditional edge). No in-graph mux node; merging is done outside the DAG via ffmpeg.


2. Design

After the change, the system consists of three planes:

  • Compile time — the config is compiled once into an immutable ExecutionPlan.
  • Control plane (ZMQ) — DagRequestScheduler makes decisions using per-request RequestDagState ledgers.
  • Data plane (RDMA) — GPU workers transfer tensors directly, pool to pool.

The orchestrator is reduced to a thin shell that only does I/O and makes no decisions. The overview below places ExecutionPlan / State / Scheduler back into their real positions across the three planes.

fig-d2-three-planes

Figure D2 (chapter overview) — Three-plane view: the Spec becomes a read-only Plan at compile time; on the control plane the Scheduler makes decisions using per-request State while the Orchestrator only performs I/O; on the data plane tensors are transferred directly between worker pools via RDMA, with the denoiser fanning out to the video / audio VAE pools.

2.1 Four-layer data structure: Spec → Plan → State → Action

The core design splits orchestration into four layers with single-direction dependency and orthogonal responsibilities. Upstream only depends on downstream and never the reverse, so each layer can be tested independently:

Layer Location Lifecycle Responsibility
Spec
user-written
dag/spec.py input Declarative config: RoleSpec/PoolSpec/StageSpec/RouteSpec/DagSpec, describes what the topology "looks like"; loadable from YAML
Plan
compiled
dag/plan.py read-only · global ExecutionPlan + CompiledNode/CompiledEdge, pre-computes derived values (in/out_degree, capability bits, AST predicates, stage_owner); zero runtime parsing, pure lookups
State
per-request ledger
dag/state.py per request · mutable RequestDagState: node_status, remaining/arrived_inputs, pending_pushes, route_ctx, partial_output — only records "where this one request is"
Action
instruction
dag/scheduler.py output · side-effect-free SourceDispatch / EdgeTransfer / CompleteRequest / FailRequest, the instructions the Scheduler hands to the thin shell to execute
fig-d1-four-layers

Figure D1 — The four-layer data structure: Spec describes the shape → Plan is the pre-compiled truth → State is per-request progress → Action is the instruction.

2.2 Compile once, read-only twice: control and data planes share one Plan

The key design, visible in the overview above: compilation happens once at startup and produces an immutable ExecutionPlan. From then on both runtime planes share it read-only (the two upward dashed references in the diagram):

  • Control plane (Scheduler + State, over ZMQ) — only moves messages, never touches tensors.
  • Data plane (Workers, over RDMA) — only transfers tensors pool to pool, makes no decisions.

Neither plane ever re-parses the topology; both do O(1) lookups against the shared Plan. This is the key to zero runtime parsing.

2.3 Compile pipeline: bad topologies fail at startup

ExecutionPlan.compile(spec) is the single entry point and a pure function (no I/O). Predicates are parsed into ASTs at compile time; errors are accumulated and raised all at once at the end as PlanValidationError. As a result the runtime can trust the Plan unconditionally — zero parsing, pure lookups:

fig-d3-compile-pipeline

Figure D3 — The 7-step compile pipeline + validation: errors are accumulated and raised together; a bad topology fails at startup, never at runtime.

2.4 State / Scheduler are orthogonal

  • Scheduler (DagRequestScheduler) — the single "brain" in the process, a pure function with no I/O. It holds the global resources (free_slots / policies / ready / states) and answers "who can occupy which slot on which instance right now, and what Action to emit next".
  • State (RequestDagState) — a per-request ledger that answers "where this one request is".

The two are orthogonal: the Scheduler does not track single-request progress, and a State does not know about other requests' occupancy.

Key boundary: the Scheduler never touches ZMQ/RDMA, so it can be unit-tested without a GPU.

2.5 Four Actions → Orchestrator loop

The Orchestrator (DiffusionServer) is the only thin shell that touches I/O. The pattern is always actions = scheduler.on_*(...) → _execute(actions):

fig-d4-action-loop

Figure D4 — The four-Action loop: the Scheduler produces instructions → the Orchestrator thin shell performs the real I/O → worker reports flow back.

2.6 Concurrency semantics: fan-out / join / conditional routing

  • fan-out: one staging pushes once per live edge; pending_pushes is a reference count, and the producer slot is released only when it reaches zero; filter_manifest shares the underlying bytes to avoid multiple copies. In LTX-2 a single denoiser staging feeds both vae_video and vae_audio.
  • fan-in / join: waits until arrived_inputs == expected_inputs; pruned edges also count as resolved, which is the core of deadlock avoidance; currently only join: all is supported (any is rejected at compile time). A typical example is conditional_vsr: vae_video has two inbound edges (from denoiser / from vsr) whose predicates are complementary, so exactly one is always pruned — precisely because pruned counts as resolved, the join never waits forever.
  • conditional routing: RouteSpec.when uses an AST allowlist interpreter (not eval) to evaluate the request's scalar metadata (such as generate_audio, width*height) on the orchestrator side; a false edge is _prune_edged, and when all inbound edges of a node are pruned it is marked SKIPPED and pruning cascades.
fig-d5-concurrency

Figure D5 — Concurrency semantics: fan-out (ltx2, reference counting controls slot release) and join (conditional_vsr, complementary predicates always prune exactly one edge; pruned counts as resolved to avoid deadlock).

2.7 Removing RoleType: capability bits

The runtime no longer has if role == ENCODER / DENOISER / DECODER; instead it does O(1) capability queries against the Plan: is_source, is_terminal, is_sender (out_degree > 0), is_receiver (in_degree > 0), needs_scheduler_init. As a result a single topology can have multiple "scheduler-needing" nodes (such as LTX-2's stage1/stage2) — something the three enumerated roles cannot do, but a graph can.


3. Implementation

3.1 New modules and changed files

New

  • DAG core (runtime/disaggregation/dag/): spec.py (4 config classes + YAML/JSON loading), plan.py (ExecutionPlan.compile / from_classic_roles), predicate.py (AST allowlist predicates), state.py (RequestDagState), scheduler.py (DagRequestScheduler + Actions).
  • Topology configs: configs/disagg_topologies/{ltx2_dual_vae, conditional_vsr, zimage_linear}.yaml.
  • Tests: test/unit/test_dag_disagg.py, test/single_test_file/test_disagg_ltx2_dag.py.
  • Docs: docs/dag-disagg-implementation.md.

Modified

  • orchestrator.py (rewritten, removed the three-role hardcoding, ~ -1254 lines), scheduler_mixin.py.
  • transport/{protocol,engine}.py, launch_server.py, server_args/disagg.py.
  • composed_pipeline_base.py, ltx_2_pipeline.py + decoding_av.py, video_api.py.

3.2 CLI / deployment changes & backward compatibility

  • New flags: --disagg-dag (topology file or inline), --dag-node (this worker's node name), --dag-validate (validate and exit).
  • The classic --encoder/denoiser/decoder-urls deployment is unchanged — it goes through from_classic_args() and compiles into a linear DAG.
fig-i1-two-paths

Figure I1 — Two entry paths converge: both the classic CLI and the DAG topology compile into the same ExecutionPlan, leaving a single code path at runtime.


4. Example & Test

4.1 Three-tier test pyramid

fig-t1-test-pyramid

Figure T1 — The three-tier test pyramid: A compile/validate (CI, no GPU) → B scheduling semantics (mock, seconds) → C end-to-end (multi-GPU); every requirement is covered by ≥ 2 cases.

Tier Case What it verifies
A compile/validate
(every commit)
T1 back-compat equivalence The DAG compiled from the classic three roles via from_classic_args() is equivalent to running them directly (top priority)
T2 illegal topologies must fail 6 kinds of bad topology (has cycle / dangling tensor edge / references a non-existent pool / unreachable join / condition references an unknown field / no sink) raise at compile time
B scheduling semantics
(mock, seconds)
T3 dual-VAE fan-out/join DONE only after both paths arrive
T4 conditional routing With ltx2 generate_audio=false the audio edge is pruned; in conditional_vsr, width*height≤1920*1080 takes the direct edge, otherwise it goes through VSR, and both branches converge to vae_video
T5 asymmetric scaling video 3 instances : audio 1 instance scale independently, without pool crossing or mutual blocking
C end-to-end
(nightly/manual)
T6 e2e + PSNR baseline Single-request end-to-end + consistency_thresholds proving the output was not broken
T7 mixed load Mixed high/low resolution without deadlock or dropped requests

4.2 Example walkthrough: LTX-2 dual-VAE disaggregation (4 GPUs)

This section shows how to run a DAG deployment end-to-end: validate the topology, start the orchestrator and workers, and submit a video request.

What you are starting

                    ┌──────────┐
  HTTP client ─────►│  server  │  orchestrator (--disagg-role server)
                    └────┬─────┘
                         │ ZMQ control + Mooncake tensor transfer
         ┌───────────────┼───────────────┐
         ▼               ▼               ▼
    ┌─────────┐    ┌──────────┐   ┌───────────┐   ┌───────────┐
    │ encoder │───►│ denoiser │──►│ vae_video │   │ vae_audio │  (terminals)
    └─────────┘    └────┬─────┘   └───────────┘   └───────────┘
                        └──────────────────────────► (fan-out)

Topology: python/sglang/multimodal_gen/configs/disagg_topologies/ltx2_dual_vae_dev.yaml (one URL per pool, no SP). Production-scale multi-replica layout: python/sglang/multimodal_gen/configs/disagg_topologies/ltx2_dual_vae.yaml (§4.7).

Prerequisites

  • Mooncake installed for inter-pool transfer.
  • 4 GPUs — one dedicated card per DAG node (see table in §4.5).
  • Run commands from the repository root (sglang/).
  • Inter-pool transfer (same-host): either (A) export MC_FORCE_TCP=1 for a TCP-only quick start (no HCA/GID setup), or (B) omit MC_FORCE_TCP, use --net=host in Docker, and on RoCE set export MC_GID_INDEX=<global RoCEv2 index> in every shell before launch (index is host-specific; check InfiniBand sysfs gid_attrs/types and gids). Multi-node production: omit MC_FORCE_TCP, configure --disagg-ib-device, and set MC_GID_INDEX on RoCE.

4.3 Step 0 — Validate the topology

Compile the DAG and print the execution plan before allocating GPUs. This checks graph structure (cycles, pools, terminals, predicates). It does not load weights or start services.

sglang serve \
  --model-path Lightricks/LTX-2.3 \
  --disagg-dag python/sglang/multimodal_gen/configs/disagg_topologies/ltx2_dual_vae_dev.yaml \
  --dag-validate

Success ends with:

DAG topology compiled successfully.

--model-path resolves the pipeline class name for a quick sanity check. Full pipeline-vs-topology stage matching happens when workers start.


4.4 Step 1 — Start the server head

Start the orchestrator first (HTTP front-end + DAG scheduler). Do not pass --dag-node on the head.

sglang serve \
  --model-path Lightricks/LTX-2.3 \
  --disagg-role server \
  --disagg-dag python/sglang/multimodal_gen/configs/disagg_topologies/ltx2_dual_vae_dev.yaml \
  --scheduler-port 35000 \
  --port 30000 \
  --host 127.0.0.1 \
  --disagg-timeout 900

The head listens for client traffic on port 30000 and talks to workers over the pool URLs in the YAML.


4.5 Step 2 — Start one worker per DAG node

Open four separate terminals. Each runs one sglang serve worker on its own GPU. Use the same --model-path and --disagg-dag on every process.

Terminal --dag-node --disagg-role --scheduler-port GPU
1 encoder encoder 35010 0
2 denoiser denoiser 35020 1
3 vae_video decoder 35030 2
4 vae_audio decoder 35040 3

Important

  • --dag-node decides which pipeline stages this process runs.
  • --disagg-role is the legacy launch label; map both VAE nodes to decoder.
  • Wait for Role … ready in each log before sending traffic.

Terminal 1 — encoder (GPU 0)

CUDA_VISIBLE_DEVICES=0 sglang serve \
  --model-path Lightricks/LTX-2.3 \
  --disagg-role encoder \
  --disagg-dag python/sglang/multimodal_gen/configs/disagg_topologies/ltx2_dual_vae_dev.yaml \
  --dag-node encoder \
  --disagg-server-addr tcp://127.0.0.1:35000 \
  --scheduler-port 35010 \
  --num-gpus 1 --base-gpu-id 0 \
  --disagg-transfer-pool-size 1073741824

Terminal 2 — denoiser (GPU 1)

CUDA_VISIBLE_DEVICES=1 sglang serve \
  --model-path Lightricks/LTX-2.3 \
  --disagg-role denoiser \
  --disagg-dag python/sglang/multimodal_gen/configs/disagg_topologies/ltx2_dual_vae_dev.yaml \
  --dag-node denoiser \
  --disagg-server-addr tcp://127.0.0.1:35000 \
  --scheduler-port 35020 \
  --num-gpus 1 --base-gpu-id 0 \
  --disagg-transfer-pool-size 1073741824 \
  --dit-layerwise-offload true

Terminal 3 — video VAE (GPU 2)

CUDA_VISIBLE_DEVICES=2 sglang serve \
  --model-path Lightricks/LTX-2.3 \
  --disagg-role decoder \
  --disagg-dag python/sglang/multimodal_gen/configs/disagg_topologies/ltx2_dual_vae_dev.yaml \
  --dag-node vae_video \
  --disagg-server-addr tcp://127.0.0.1:35000 \
  --scheduler-port 35030 \
  --num-gpus 1 --base-gpu-id 0 \
  --disagg-transfer-pool-size 1073741824

Terminal 4 — audio VAE (GPU 3)

CUDA_VISIBLE_DEVICES=3 sglang serve \
  --model-path Lightricks/LTX-2.3 \
  --disagg-role decoder \
  --disagg-dag python/sglang/multimodal_gen/configs/disagg_topologies/ltx2_dual_vae_dev.yaml \
  --dag-node vae_audio \
  --disagg-server-addr tcp://127.0.0.1:35000 \
  --scheduler-port 35040 \
  --num-gpus 1 --base-gpu-id 0 \
  --disagg-transfer-pool-size 1073741824

4.6 Step 3 — Submit a request

Video with audio (denoiser fans out to both VAE terminals; head muxes mp4):

curl -X POST http://127.0.0.1:30000/v1/videos \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "Lightricks/LTX-2.3",
    "prompt": "A cat walking on grass",
    "seconds": 1,
    "size": "512x320",
    "num_inference_steps": 4,
    "num_frames": 17,
    "generate_audio": true
  }'

Poll GET /v1/videos until the job status is completed, then download:

curl -o out.mp4 http://127.0.0.1:30000/v1/videos/<job-id>/content

Silent video — set "generate_audio": false. The orchestrator prunes the conditional denoiser → vae_audio edge; vae_audio does not run for that request.


4.7 Scaling beyond the dev example

The checked-in python/sglang/multimodal_gen/configs/disagg_topologies/ltx2_dual_vae.yaml targets production-scale pools (multiple URLs per node, parallelism: {sp: 2}). To use it as written:

  • Start one worker process per pool URL (--disagg-instance-id = index in the URL list).
  • Set --num-gpus on each worker to match that pool's parallelism.sp.
  • Register every instance before expecting traffic.

See python/sglang/multimodal_gen/docs/dag-disagg-implementation.md for fan-out/join semantics and pool capacity behavior.

Classic three-role deployment is unchanged — omit --disagg-dag and use --encoder-urls / --denoiser-urls / --decoder-urls as before. That path compiles to the same linear DAG as python/sglang/multimodal_gen/configs/disagg_topologies/zimage_linear.yaml.


4.8 Automated tests (optional)

CI and regression coverage live in python/sglang/multimodal_gen/test/unit/test_dag_disagg.py and python/sglang/multimodal_gen/test/single_test_file/test_disagg_ltx2_dag.py. They are not required to operate a cluster manually.

Checklist

Review and Merge Process

  1. Ping Merge Oncalls to start the process. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • Common commands include /tag-and-rerun-ci, /tag-run-ci-label, /rerun-failed-ci
  4. After green CI and required approvals, ask Merge Oncalls or people with Write permission to merge the PR.

CI States

Latest PR Test (Base): ❌ Run #30423746530
Latest PR Test (Extra): ❌ Run #30423746193

Introduce a declarative DAG package so diffusion disaggregation can
express named pools, conditional routes, and fan-out/join without the
fixed encoder/denoiser/decoder role model.
…protocol

Add topology loading and result-endpoint derivation, DAG server/worker
launch helpers, and transport protocol/codec updates needed by named
DAG nodes. Drop the unused mock transfer-backend CLI choice.
…estScheduler

Replace the fixed three-role orchestrator queues with DAG scheduling,
teach workers fan-out staging/recv by edge, and let pipelines filter
stages from the compiled plan while keeping classic deployments working.
Ship linear and conditional-join example topologies for Z-Image, with
unit tests that compile the plans and assert resolution-based routing.
Teach the test harness to render --disagg-dag topologies and multi-
instance GPU layouts, and add a Z-Image DAG smoke that mirrors the
classic 1-rank layout.
Bring back LTX topology compile/layout unit tests alongside the Z-Image
examples so shipped DAG configs stay validated without requiring GPU e2e.
Keep only the baseline ltx2_dual_vae.yaml in shipped topology tests until
the multi-GPU layouts are ready to land with e2e coverage.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions github-actions Bot added the diffusion SGLang Diffusion label Jul 27, 2026
@niehen6174 niehen6174 closed this Jul 27, 2026
@niehen6174 niehen6174 reopened this Jul 27, 2026
Allow video/audio VAE stages to run as independent DAG nodes and wire
generate_audio through the OpenAI video API for conditional audio pruning.
Cover denoiser fan-out, muxed AV output, generate_audio=false pruning,
and stage-plan split on the 4-GPU ltx2_dual_vae topology.
@niehen6174
niehen6174 marked this pull request as ready for review July 28, 2026 07:44
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Use a colocated 2-GPU layout so the LTX dual-VAE pytest fits the existing
multimodal 2-gpu suite, and move LTX topology stage-coverage checks into unit
tests.
Avoid building the pipeline during topology validation so large models like LTX-2 do not require weight loading or distributed init; stage coverage remains enforced by unit and E2E tests.
Add the required blank line between imports and module-level constants.
The LTX dual-VAE e2e no longer sets MC_FORCE_TCP=1 in setUpClass so
RoCE hosts can exercise real Mooncake RDMA when MC_GID_INDEX is set.
Document RoCE GID setup and reserve MC_FORCE_TCP for TCP-only runs.
Resolve decoding_av.py by keeping dual-VAE stage split and adopting
main's autocast_context helper for video/audio decode paths.
@mickqian

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Sep 24, 2026

@mickqian mickqian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 14:30 UTC CI follow-up snapshot reported conflicts with main on this head; the latest query is UNKNOWN, which does not confirm resolution. I do not have push access to the fork. Please merge main and resolve the conflicts before final CI. The missing run-ci label has been restored and verified via one trigger comment; no duplicate trigger is needed.

detain added a commit to detain/sglang that referenced this pull request Oct 8, 2026
Replace the three-role DiffusionServer with a plan-driven DAG router:
topology YAMLs (configs/disagg_topologies/), runtime/disaggregation/dag/
(plan/spec/predicate/scheduler/state), per-node result demux, edge
transfer state machine, and conditional-join/linear example topologies.
LTX-2 AV decoding splits into LTX2VideoDecodingStage / LTX2AudioDecodingStage
so a dual-VAE topology can scale them independently (ltx2_dual_vae.yaml).

Squash of sgl-project#32550 (13 commits, base 2026-07-29) applied
with git apply -3; conflict resolutions vs the evolved tree:

- orchestrator.py: taken wholesale from the PR (14 conflicts). Our
  Sep/Oct additions (GLM AR-batch dispatch/monitor machinery and
  _deserialize_request_metrics in result-frame handling) are NOT
  re-ported: the DAG router has no equivalent hooks yet.
- launch_server.py: DiffusionServer -> from_classic_args at both classic
  call sites; dropped server_args=/glm_distributed_mode_enabled= kwargs
  (new signature is plan-only); generalized warmup_mode by plan.is_source;
  dag_validate gate before plugin hooks; KNOWN REGRESSION guarded:
  GLM distributed denoiser mode (GlmImagePipeline + --srt-encoder-url
  without encoder/decoder urls) now raises NotImplementedError in
  launch_disagg_server instead of silently mis-routing.
- scheduler_mixin.py: PR's node-based worker rewrite as base; grafted
  our features: _advertised_pool_work_endpoint for TransferRegisterMsg,
  GLM distributed relay_compute prefetch handler +
  _execute_glm_distributed_denoiser_request + _is_glm_distributed_mode,
  _broadcast_recv_reqs (called from managers/scheduler.py),
  extract/restore_extra_tensors overlay, broadcast_pyobj import path fix,
  TransferStagedMsg dataclass (with node=) replaces hand-built staged
  JSON in _disagg_stage_and_notify.
- transport/protocol.py: node field added to staged message (kept our
  default_factory scalars).
- decoding_av.py: PR's video/audio stage split rebuilt on top of our
  LTX-2.5 evolution: module-level _decode_video keeps the
  batch.use_diffusion_decoder branch (diffusion decoder + generator seed,
  resolve_decode_precision) and _prepare_latents denorm; the DAG video
  node also receives diffusion_decoder from the pipeline
  (ltx_2_pipeline.py). _decode_audio_into + audio/AV classes per PR.
- video_api.py: kept our kwargs-dict shape; generate_audio forwarded via
  _extra_value like other optional overrides.
- docs path: none needed (PR carried no doc moves); topologies yaml landed.

Verified: py_compile of all 23 touched py files; import smoke of
orchestrator/scheduler_mixin/dag/decoding_av; test_dag_disagg.py 34 pass;
unit disagg suite (extra_tensors/roles/trace) 54 pass 3 skip. GPU e2e
(disagg servers) deferred - prod GPUs busy.
detain added a commit to detain/sglang that referenced this pull request Oct 8, 2026
sgl-project#32550's orchestrator rewrite dropped _deserialize_request_metrics and the
metrics scalars from the terminal result path (known regression + broke
test_performance_metrics.py import). Restores the helper, forwards
metrics/metrics_list/peak_memory_mb/usage from terminal scalar_fields,
exempts them from per-node emit allowlists (any terminal may carry them;
first-wins), and populates OutputBatch as the classic path did.
detain added a commit to detain/sglang that referenced this pull request Oct 8, 2026
… of sgl-project#33036)

Squash of 14 commits 5d2f658..12e5682 (net diff from PR base
1270204 applied with git apply -3). Adds --parallel-stage-execution
{auto|serial} (default serial): parallel_executor builds groups from
stages declaring concurrency safety and overlaps independent CUDA
conditioning stages (Wan I2V text+image encoders first), with explicit
collective sequencing for distributed, residency-manager coordination in
component_manager, and stage-contract markers in stages/base.py,
text_encoding.py, image_encoding.py + per-pipeline declarations.

Conflict resolutions:
- component_manager.py imports: union (theirs threading + ours Iterable).
- cli.mdx: kept our fuller cfg-parallel/encoder-parallel bullets, appended
  theirs' new --parallel-stage-execution bullet.
- composed_pipeline_base.py (which carries our sgl-project#32550 DAG hooks) and
  parallel_executor.py auto-merged cleanly; re-verified by tests.

Tests: test_parallel_stage_groups.py + test_server_args.py 221 passed;
unit -k "pipeline or executor or component or residency or stage"
651 passed.
detain added a commit to detain/sglang that referenced this pull request Oct 8, 2026
… of sgl-project#43064)

Squash of 13 commits 48c3a28..da3d8c6 (PR rebased onto main tip
407f7f0; net diff via git apply -3). Removes rethrow-only wrappers,
obsolete channels_last_3d/sinc fallbacks, identity assignments; shares
BCG model unwrapping, component-name normalization, and LLM-encoder
weight loading (load_llm_encoder_weights).

Conflict resolutions:
- encoders/llama.py + qwen3.py: took theirs (shared helper call).
  Ported load_stacked_weight() def from merged upstream sgl-project#42988 (not in
  our tree) into weight_utils.py as the helper's dependency.
- layers/lora/linear.py: kept OURS in all 4 blocks — our sgl-project#37460 rework
  already removes the per-class inits/forwards this PR targets; the one
  clean hunk (redundant LinearWithLoRA.__init__) applied.
- disaggregation/orchestrator.py: kept OURS (file is our sgl-project#32550 DAG
  rewrite; the PR's receiver-dispatch dedupe targeted old main shape).
  Net file unchanged.
- Skipped two PR file-hunks outright: vaes/alias_free.py and
  model_specific_stages/kandinsky6/decoding.py exist only upstream of
  our merge-base (not in this tree).

Tests: py_compile all; unit -k lora/encoder/padding/breakable/vision/
transfer 347 passed; weight_utils runai-module failures pre-existing
(env lacks runai_model_streamer), file untouched by PR.
@niehen6174

Copy link
Copy Markdown
Collaborator Author

The implementation here is fairly complex, so I am closing this for now. We can pick it up again when there is a concrete need.

@niehen6174 niehen6174 closed this Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diffusion SGLang Diffusion run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants