Skip to content

fix(vllm): migrate GLM-Image NIXL config to the stages deploy schema - #12984

Merged
GuanLuo merged 2 commits into
mainfrom
gluo/dyn-3802-omni-nixl-ar-resume-keyerror
Aug 11, 2026
Merged

fix(vllm): migrate GLM-Image NIXL config to the stages deploy schema#12984
GuanLuo merged 2 commits into
mainfrom
gluo/dyn-3802-omni-nixl-ar-resume-keyerror

Conversation

@GuanLuo

@GuanLuo GuanLuo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Overview:

GLM-Image AR→DiT disaggregation over NIXL dies on the first
/v1/images/generations request. The AR stage's engine core exits, the request
returns HTTP 500, and the deployment does not recover:

File "vllm_omni/worker/gpu_model_runner.py", line 749, in _update_states
    resumed_token_ids = req_data.all_token_ids[req_id]
KeyError: '<uuid>-<8 hex>'

followed by Stage-0 replica-0 is dead and [AsyncOmni] Engine dead.

Summary

stage_configs/glm_image_nixl.yaml was the last config on vllm-omni's legacy
stage_args schema. That schema bypasses the deploy-config resolution in
vllm_omni/config/stage_config.py, which is what keeps the AR scheduler class
and the async_scheduling engine arg consistent: _resolve_scheduler() returns
OmniARScheduler for sync and OmniARAsyncScheduler for async, and the caller
derives the engine arg from whichever it selected.

Bypassing that, the config pinned scheduler_cls: OmniARScheduler — the
synchronous scheduler — and left async_scheduling unset, so the engine ran
async scheduling against a sync scheduler. The sync scheduler does not populate
CachedRequestData.all_token_ids, but the model runner's async-scheduling
resume path indexes it unconditionally. First request, KeyError, dead engine
core.

The scheduler_cls line dates to #10071 and was plausible when written: the
sync/async split in omni_ar_scheduler.py landed separately, keeping the old
name for the sync variant while async_scheduling defaults on. The only other
place that line appears upstream is a platforms.npu block, where it is
harmless because the NPU model runner has no all_token_ids resume path.

This migrates the file to the stages schema and drops scheduler_cls, so the
matched scheduler / async_scheduling pair is resolved by vllm-omni rather than
hand-declared.

Details:

#12709 fixed an earlier crash in this same file and named this cause exactly —
"the legacy stage_args config format applies no schema defaults", and "the SHM
variant is unaffected because it consumes vllm-omni's own packaged config in the
stages format, whose parser supplies the default". That fix supplied the one
missing default; this removes the reason defaults go missing at all.

Topology that GLM_IMAGE_PIPELINE already freezes is dropped rather than
restated: stage and model types, model/tokenizer subdirs, input sources, the
AR→DiT input processor, and final-output flags. That retires the
engine_input_source: [] workaround from #12709, since input sources now come
from the pipeline.

async_chunk: false is now explicit — DeployConfig defaults it to True and
GLM-Image declares no async-chunk next-stage processor. This matches vllm-omni's
own deploy/glm_image.yaml.

Deployment knobs, env-var device/TP selection, and sampling params carry over
unchanged. Top-level connectors:/edges: are the stages-schema spelling of
the previous runtime.connectors/runtime.edges; the connector initializer
normalizes both to the same internal shape. The dropped runtime.defaults
(window_size, max_inflight) has no consumer in vllm-omni.

The launch script needs no change: --stage-configs-path detects a stages
document and routes it to the deploy-config loader.

Validation

  • pre-commit run --files examples/backends/vllm/launch/stage_configs/glm_image_nixl.yaml — clean.
  • Config resolves through vllm-omni's deploy loader to the intended matched
    pair: scheduler_cls=OmniARAsyncScheduler with async_scheduling=True.
  • Manual 2-GPU single-node run via disagg_omni_glm_image_nixl.sh: both stages
    start, /v1/images/generations returns an image, and the AR engine core no
    longer dies on the first request.

Where should the reviewer start?

Single file, -73/+46. The load-bearing change is the absence of
scheduler_cls — everything else is schema translation or removal of topology
the pipeline already owns.

One thing carried over unchanged and worth a second opinion: stage 1's
output_connectors: {to_stage_router: dit_to_router}. The to_stage_router key
appears nowhere in either this repo or vllm-omni, so the DiT→router hop may not
actually be on NIXL. Left as-is here to keep this change to the crash fix;
worth its own issue.

🤖 Generated with Claude Code


Open in Devin Review

Summary by CodeRabbit

  • Refactor
    • Updated the GLM image deployment configuration to the current deployment schema.
    • Simplified pipeline and stage configuration settings for improved consistency.
    • Consolidated connector, scheduling, caching, and execution settings at the deployment level.

The config was the last user of vLLM-Omni's legacy `stage_args` schema,
which bypasses the deploy-config resolution in stage_config.py. That
resolution is what keeps the AR scheduler class and the `async_scheduling`
engine arg in sync: _resolve_scheduler() returns OmniARScheduler for sync
and OmniARAsyncScheduler for async, and the caller derives the engine arg
from whichever it picked.

Bypassing it, the config pinned `scheduler_cls: OmniARScheduler` (the
synchronous scheduler) while leaving `async_scheduling` unset, so the
engine ran async scheduling against a sync scheduler. The sync scheduler
does not populate CachedRequestData.all_token_ids, but the model runner's
async-scheduling resume path indexes it unconditionally, killing the AR
engine core with a KeyError on the first request.

Migrate to the `stages` schema and drop `scheduler_cls` so the matched
scheduler/async_scheduling pair is resolved by vLLM-Omni. Topology that
GLM_IMAGE_PIPELINE already freezes (stage/model types, model and tokenizer
subdirs, input sources, AR->DiT input processor, final-output flags) is
removed rather than restated -- this retires the `engine_input_source: []`
workaround, since input sources now come from the pipeline. Deployment
knobs, env-var device/TP selection, sampling params, and connector wiring
are carried over unchanged.

The launch script needs no change: --stage-configs-path detects a `stages`
document and routes it to the deploy-config loader.

Signed-off-by: Guan Luo <41310872+GuanLuo@users.noreply.github.com>
@GuanLuo
GuanLuo requested a review from a team as a code owner August 11, 2026 00:17
@github-actions github-actions Bot added fix backend::vllm Relates to the vllm backend labels Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: fe9c45e2-f898-4ec0-ae9b-20db043d0ac8

📥 Commits

Reviewing files that changed from the base of the PR and between bb5b141 and bd962a9.

📒 Files selected for processing (1)
  • examples/backends/vllm/launch/stage_configs/glm_image_nixl.yaml

Walkthrough

The GLM-Image Nixl configuration now uses the deployment configuration schema. It defines deployment-level settings, connectors, and stage edges. The AR and DiT stages use direct deployment-stage fields.

Changes

GLM-Image deployment configuration

Layer / File(s) Summary
Deployment topology and connector configuration
examples/backends/vllm/launch/stage_configs/glm_image_nixl.yaml
The configuration references the frozen glm_image pipeline and defines deployment settings, Nixl connectors, and the AR-to-DiT edge.
Direct AR and DiT stage fields
examples/backends/vllm/launch/stage_configs/glm_image_nixl.yaml
The AR and DiT stages move from nested legacy fields to direct device, resource, scheduling, connector, and sampling fields. Legacy model, runtime, processor, input-source, and final-output declarations are removed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the incident, technical cause, changes, review focus, and validation, but it omits the required Related Issues section. Add the required Related Issues section and either link the relevant issue or confirm that no related issue exists.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the migration of the GLM-Image NIXL configuration to the stages deploy schema.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@datadog-official

This comment has been minimized.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 4 potential issues.

Open in Devin Review

Comment thread examples/backends/vllm/launch/stage_configs/glm_image_nixl.yaml
Comment thread examples/backends/vllm/launch/stage_configs/glm_image_nixl.yaml
Comment thread examples/backends/vllm/launch/stage_configs/glm_image_nixl.yaml
Comment thread examples/backends/vllm/launch/stage_configs/glm_image_nixl.yaml

@ayushag-nv ayushag-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

@GuanLuo
GuanLuo merged commit bed27ef into main Aug 11, 2026
112 checks passed
@GuanLuo
GuanLuo deleted the gluo/dyn-3802-omni-nixl-ar-resume-keyerror branch August 11, 2026 18:25
pvijayakrish pushed a commit that referenced this pull request Aug 11, 2026
…(cherry-pick #12984) (#13033)

Signed-off-by: Guan Luo <41310872+GuanLuo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend::vllm Relates to the vllm backend fix size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants