From dd0f8333cee3dbf011a4199b8d1ef476548ba955 Mon Sep 17 00:00:00 2001 From: linyueqian Date: Tue, 24 Mar 2026 23:58:03 -0400 Subject: [PATCH] [Bugfix] Auto-inject architectures from stage config model_arch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a model's config.json lacks the `architectures` field (e.g. Fish Speech s2-pro), vLLM 0.18.0's ModelConfig.__init__ raises "No model architectures are specified". The stage config already specifies `model_arch` but it was only used after ModelConfig creation, which is too late. Now injects `model_arch` via `hf_overrides` before calling super().create_model_config(). No extra config load needed — hf_overrides merges cleanly when architectures already exists. Tested with Fish Speech s2-pro and Qwen3-TTS. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: linyueqian --- vllm_omni/engine/arg_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vllm_omni/engine/arg_utils.py b/vllm_omni/engine/arg_utils.py index f3b04272e01..04036fd71c3 100644 --- a/vllm_omni/engine/arg_utils.py +++ b/vllm_omni/engine/arg_utils.py @@ -125,6 +125,13 @@ def create_model_config(self) -> OmniModelConfig: } stage_connector_config["extra"]["stage_id"] = self.stage_id + # If the stage config specifies model_arch, ensure architectures is + # set in hf_overrides so vLLM's ModelConfig can resolve the model + # class. This is a no-op when the model already has architectures + # in config.json (hf_overrides merges, existing values take priority). + if self.model_arch and not self.hf_overrides: + self.hf_overrides = {"architectures": [self.model_arch]} + # Build the vLLM config first, then use it to create the Omni config. model_config = super().create_model_config()