From 30adf78f82682b8e389a448d6933d33c8cc7b985 Mon Sep 17 00:00:00 2001 From: RoyWang Date: Thu, 29 Jan 2026 17:50:57 +0800 Subject: [PATCH] [diffusion]: align sglang diffusion AMD pyproject_other.toml diffusion dependency with pyproject.toml (#16225) Co-authored-by: roywang --- docker/rocm.Dockerfile | 2 +- docs/platforms/amd_gpu.md | 2 +- python/pyproject_other.toml | 12 ++++++------ .../multimodal_gen/runtime/loader/weight_utils.py | 5 ----- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/docker/rocm.Dockerfile b/docker/rocm.Dockerfile index 44687afd4..ab2c23040 100644 --- a/docker/rocm.Dockerfile +++ b/docker/rocm.Dockerfile @@ -183,7 +183,7 @@ RUN git clone ${SGL_REPO} \ && if [ "$BUILD_TYPE" = "srt" ]; then \ python -m pip --no-cache-dir install -e "python[srt_hip,diffusion_hip]"; \ else \ - python -m pip --no-cache-dir install -e "python[all_hip,diffusion_hip]"; \ + python -m pip --no-cache-dir install -e "python[all_hip]"; \ fi RUN python -m pip cache purge diff --git a/docs/platforms/amd_gpu.md b/docs/platforms/amd_gpu.md index 1759e9a73..2b3f4ae72 100644 --- a/docs/platforms/amd_gpu.md +++ b/docs/platforms/amd_gpu.md @@ -55,7 +55,7 @@ python setup_rocm.py install # Install sglang python package along with diffusion support cd .. rm -rf python/pyproject.toml && mv python/pyproject_other.toml python/pyproject.toml -pip install -e "python[all_hip,diffusion_hip]" +pip install -e "python[all_hip]" ``` ### Install Using Docker (Recommended) diff --git a/python/pyproject_other.toml b/python/pyproject_other.toml index 786f2050a..e8acb6d94 100755 --- a/python/pyproject_other.toml +++ b/python/pyproject_other.toml @@ -85,18 +85,18 @@ srt_hip = [ ] diffusion_hip = [ - "diffusers @ git+https://github.com/huggingface/diffusers.git@6290fdfda40610ce7b99920146853614ba529c6e", - "opencv-python-headless==4.10.0.84", + "PyYAML==6.0.1", + "cloudpickle", + "diffusers==0.36.0", "imageio==2.36.0", "imageio-ffmpeg==0.5.1", - "PyYAML==6.0.1", "moviepy>=2.0.0", - "cloudpickle", + "opencv-python-headless==4.10.0.84", "remote-pdb", - "torchcodec==0.5.0", "st_attn==0.0.7", "vsa==0.0.4", "runai_model_streamer>=0.15.5", + "cache-dit==1.1.8" ] # For Intel Gaudi(device : hpu) follow the installation guide @@ -141,7 +141,7 @@ test = [ "tabulate", ] -all_hip = ["sglang[srt_hip]"] +all_hip = ["sglang[srt_hip]", "sglang[diffusion_hip]"] all_hpu = ["sglang[srt_hpu]"] all_musa = ["sglang[srt_musa]", "sglang[diffusion_musa]"] diff --git a/python/sglang/multimodal_gen/runtime/loader/weight_utils.py b/python/sglang/multimodal_gen/runtime/loader/weight_utils.py index 17391c577..89d22b31e 100644 --- a/python/sglang/multimodal_gen/runtime/loader/weight_utils.py +++ b/python/sglang/multimodal_gen/runtime/loader/weight_utils.py @@ -23,11 +23,6 @@ try: except ImportError: HAS_RUNAI_MODEL_STREAMER = False -# Disable runai_model_streamer on AMD/ROCm due to global state issues -# that cause "Streamer is handling previous request" errors -if torch.version.hip is not None: - HAS_RUNAI_MODEL_STREAMER = False - from sglang.multimodal_gen.runtime.distributed import get_local_torch_device from sglang.multimodal_gen.runtime.utils.logging_utils import init_logger