[Edge][WP6] Slim the AR/TTS import path and add an edge dependency set
* diffusers is no longer imported by vllm_omni.diffusion.data (annotation only); vllm_omni.diffusion.io_support (diffusion registry + distributed state) is imported lazily by config_factory and async_omni_engine, so constructing a Qwen3-TTS pipeline config / AsyncOmni no longer loads diffusers, x_transformers or whisper (guarded by tests/config/test_import_guard.py). * requirements/common.txt = core.txt (AR/speech runtime) + media.txt (diffusion/video/extra audio); VLLM_OMNI_EDGE_BUILD=1 makes setup.py use requirements/<device>-edge.txt (core only); `edge` extra adds websockets and sounddevice for on-device clients. Measured on this host (CUDA venv): `import vllm` 7.0-7.9 s, `import vllm_omni` adds ~20 s of which ~17 s is transformers' own import (transformers.utils.import_utils) pulled in by vllm_omni.patch / vllm_omni.version; that floor is not vLLM-Omni's and is unchanged. Guard test: no diffusion module loaded on the TTS path. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
49a839ecf9
commit
8e912db6c8
11 files changed
+98
-45
No files matched your search
@@ -10,7 +10,9 @@ from dataclasses import dataclass, field, fields
|
||||
from enum import Enum
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
import diffusers
|
||||
if TYPE_CHECKING: # heavy; only needed for annotations here
|
||||
import diffusers
|
||||
|
||||
import huggingface_hub
|
||||
import torch
|
||||
from PIL import Image
|
||||
@@ -897,7 +899,7 @@ class OmniDiffusionConfig:
|
||||
# kwargs forwarded to pipeline.__call__()
|
||||
diffusers_call_kwargs: dict[str, Any] = field(default_factory=dict)
|
||||
# Actual diffusers pipeline object (to determine inputs of the dummy run)
|
||||
diffusers_pipeline_cls: type[diffusers.DiffusionPipeline] | None = None # pyright: ignore[reportPrivateImportUsage]
|
||||
diffusers_pipeline_cls: "type[diffusers.DiffusionPipeline] | None" = None # pyright: ignore[reportPrivateImportUsage]
|
||||
|
||||
# http server endpoint config, would be ignored in local mode
|
||||
host: str | None = None
|
||||
|
||||
Reference in new issue
Block a user