[Rebase] Rebase to vllm 0.28.0 (#6606)

Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Zhou TaichangandClaude Opus 5 authored and GitHub committed 2026-08-27 06:12:55 +00:00
1 parent da4a08b65b
commit 651b03225b
42 files changed
+931 -121

No files matched your search

@@ -1,3 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
from __future__ import annotations
import torch
@@ -91,6 +94,21 @@ class MoTQKVParallelLinear(QKVParallelLinear):
# boilerplate Module subclass just for the VAE pathway.
self.gen_exp = torch.nn.Module()
# ``gen_exp`` participates in the same tensor-parallel layout as this
# layer. vLLM's online quantizers inspect these attributes while
# processing weights (for example, FP8 uses them to share scales across
# TP ranks), so the lightweight container must expose the parallel
# linear metadata rather than only holding parameters.
for attr in (
"tp_rank",
"tp_size",
"input_size",
"input_size_per_partition",
"output_size",
"output_size_per_partition",
):
setattr(self.gen_exp, attr, getattr(self, attr))
# Use the same weight_loader as text
vae_weight_loader = (
self.weight_loader_v2
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
from __future__ import annotations
import torch
@@ -84,6 +87,21 @@ class MoTRowParallelLinear(RowParallelLinear):
# boilerplate Module subclass just for the VAE pathway.
self.gen_exp = torch.nn.Module()
# ``gen_exp`` participates in the same tensor-parallel layout as this
# layer. vLLM's online quantizers inspect these attributes while
# processing weights (for example, FP8 uses them to share scales across
# TP ranks), so the lightweight container must expose the parallel
# linear metadata rather than only holding parameters.
for attr in (
"tp_rank",
"tp_size",
"input_size",
"input_size_per_partition",
"output_size",
"output_size_per_partition",
):
setattr(self.gen_exp, attr, getattr(self, attr))
# Select weight_loader consistent with text
vae_weight_loader = (
self.weight_loader_v2
+17 -4
View File
@@ -25,7 +25,12 @@ from vllm.logger import init_logger
from vllm.utils.network_utils import get_open_zmq_ipc_path, zmq_socket_ctx
from vllm.utils.system_utils import get_mp_context
from vllm.v1.engine.core import EngineCoreProc
from vllm.v1.engine.utils import CoreEngine, EngineZmqAddresses, wait_for_engine_startup
from vllm.v1.engine.utils import (
CoreEngine,
CoreEngineLaunch,
EngineZmqAddresses,
wait_for_engine_startup,
)
from vllm.v1.utils import shutdown
from vllm_omni.diffusion.data import DiffusionRequestAbortedError
@@ -764,7 +769,6 @@ class StageDiffusionProcManager:
with zmq_socket_ctx(handshake_address, zmq.ROUTER, bind=True) as handshake_socket:
wait_for_engine_startup(
handshake_socket,
self.addresses,
[CoreEngine(index=0, local=True)],
SimpleNamespace(
data_parallel_size_local=1,
@@ -773,8 +777,17 @@ class StageDiffusionProcManager:
),
False,
None,
self,
None,
CoreEngineLaunch(
engine_manager=self,
coordinator=None,
addresses=self.addresses,
tensor_queue=None,
# StageDiffusionProcManager is not a CoreEngineProcManager,
# so upstream's isinstance-gated sentinel registration would
# be skipped; watch the subprocess directly so a proc death
# during handshake is still detected.
watched_frontend_processes=[self.proc],
),
)
except Exception:
shutdown([self.proc])