Skip to content

[Fix] [AMD] diffusion: Install websockets with the ROCm diffusion extras - #44529

Open
stayinalive181 wants to merge 2 commits into
sgl-project:mainfrom
stayinalive181:rocm-diffusion-websockets
Open

stayinalive181 wants to merge 2 commits into
sgl-project:mainfrom
stayinalive181:rocm-diffusion-websockets

Conversation

@stayinalive181

@stayinalive181 stayinalive181 commented Oct 15, 2026 •

Copy link
Copy Markdown

Motivation

The CUDA diffusion extra in python/pyproject.toml lists websockets. diffusion_common in python/pyproject_other.toml does not. That block is the base for diffusion_hip (installed by the ROCm Docker image and, through all_hip, by the AMD CI), and for diffusion_musa and diffusion_mps.

Without websockets or wsproto, uvicorn cannot accept a WebSocket upgrade, so the realtime video API is unreachable on ROCm installs:

  • The shipped image. lmsysorg/sglang-rocm:v0.5.21-rocm10-mi35x-20261014 (SGLang bab9c81) has neither package. On it, a robbyant/lingbot-world-fast-diffusers server with --pipeline-class-name LingBotWorldCausalDMDPipeline reports healthy on 1× MI355X, but an upgrade request to /v1/realtime_video/generate gets 404 Not Found, and uvicorn logs No supported WebSocket library detected. Please use "pip install 'uvicorn[standard]'", or install 'websockets' or 'wsproto' manually.
  • The AMD CI. It hits the same gap from the client side. lingbot_world_realtime_plastic_beach is skipped on every multimodal-gen-test-1-gpu-amd run (for example scheduled run 38661136204, partition 3) at the websockets import guard in test/server/realtime_consistency.py, so the realtime path never runs on AMD.

Modifications

Add websockets to diffusion_common, unpinned as in the CUDA extra.

Accuracy Tests

Same image and server on 1× MI355X (gfx950), with websockets 17.2 installed:

  • The upgrade request returns 101 Switching Protocols.
  • pytest sglang/multimodal_gen/test/server/test_server_1_gpu.py -k lingbot_world_realtime_plastic_beach gives 1 passed in 95.7 s.

Speed Tests and Profiling

No kernel or model change. Chunk timings from that run (832×480, warmup off):

  • The first chunk takes 27.4 s, which includes the first-call compile.
  • The next three take 1.75–1.89 s per 12-frame chunk.

cc @HaiShaw @michaelzhang-ai, since this also lets the AMD lane run the realtime LingBot-World case instead of skipping it.


CI States

Latest PR Test (Base): ❌ Run #41658858120
Latest PR Test (Extra): ❌ Run #41658857850
Latest PR Test (AMD ROCm 10): ❌ Run #41658857577

Tip

Base CI only covers the core cases, and its workload may not exercise your change. Use /rerun-test to run the tests your change touches, or copy this prompt for an agent:

Find the registered tests this PR affects and run them with /rerun-test, following https://github.com/sgl-project/sglang/blob/main/.agents/skills/rerun-test/SKILL.md

The CUDA diffusion extra lists websockets, but diffusion_common in
pyproject_other.toml, which the ROCm image, the AMD CI install and the
MUSA and MPS extras build on, does not. Without websockets or wsproto,
uvicorn cannot accept a WebSocket upgrade, so /v1/realtime_video/generate
answers 404 on the lmsysorg/sglang-rocm images and the AMD CI skips
lingbot_world_realtime_plastic_beach at its websockets import guard.
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Oct 15, 2026
@stayinalive181

Copy link
Copy Markdown
Author

@michaelzhang-ai thanks for the reply on #44421. Could you add run-ci here when you get a chance? The AMD 1-GPU diffusion lane is the one that matters for this change. With websockets installed, lingbot_world_realtime_plastic_beach should run there instead of being skipped. With the same dependency added it passed on an MI355X (1 passed, 95.7 s).

@michaelzhang-ai michaelzhang-ai added the run-ci CI: run the baseline test suite on this PR label Oct 22, 2026
@michaelzhang-ai

Copy link
Copy Markdown
Collaborator

Thanks, the diff looks right: diffusion_common was the only diffusion extra missing websockets compared to the CUDA extra, and the AMD diffusion jobs install it through dev_hip. Added run-ci. One small thing: the commit also flips pyproject_other.toml from 755 to 644. Could you restore the mode so the diff is just the one line? I'll check partition 3 of multimodal-gen-test-1-gpu-amd, since that lane runs on MI300 rather than MI355X.

@michaelzhang-ai michaelzhang-ai removed the run-ci CI: run the baseline test suite on this PR label Oct 29, 2026
The previous commit changed the file mode from 755 to 644 by accident.
The diff is now the one-line websockets addition only.
@stayinalive181

Copy link
Copy Markdown
Author

@michaelzhang-ai Restored the 755 mode in 6d1c0ce, so the diff is now only the one-line websockets addition.

From the earlier run-ci run: lingbot_world_realtime_plastic_beach now runs on the AMD 1-GPU lane instead of being skipped, and it passes on multimodal-gen-test-1-gpu-amd shard 3 (MI300). The failures in that run look unrelated to this change:

  • shard 0: test_residual_gate_add2 bit-identity check, plus the two test_perf_fixture_retains_failed_case_results cases
  • shard 1: test_kandinsky6_bf16_dtype FA dispatch, test_rowwise_fp8 subtests
  • shard 2: collection error in test_flux3_prims_ts_config.py (No module named 'flashinfer')
  • shard 3: test_kandinsky6_layerwise_offload (audio-vae), test_qwen3_5_encoder[fa]

@stayinalive181

Copy link
Copy Markdown
Author

@michaelzhang-ai One more AMD diffusion gap we noticed while reading the AMD lane: pr-test-amd.yml runs the multimodal-gen suites with SGLANG_SKIP_CONSISTENCY=1, and both get_consistency_platform() and get_perf_baseline_platform() fall back to the H100 files on ROCm. So an AMD-only numerical regression (for example a wrong attention backend) would still pass. Intel added intel_xpu_b60.json thresholds for the same situation. Would an AMD thresholds file be useful to you, so consistency can be switched on for the AMD lane? If yes, would you prefer that we measure the cases on MI355X, or could one lane run with SGLANG_SKIP_CONSISTENCY=0 so the thresholds come from the MI300 runners themselves?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants