From e8b9425bab16c1a2756d4d074a37a1719817c5e1 Mon Sep 17 00:00:00 2001 From: hsliu Date: Fri, 26 Sep 2025 15:59:50 +0800 Subject: [PATCH] refactor: move omni_llm.py to entrypoints directory - Move vllm_omni/core/omni_llm.py to vllm_omni/entrypoints/omni_llm.py - Update all import statements across the codebase to reflect new location - Fix relative imports within the moved file - Maintain functionality while improving code organization - All imports and functionality tested and working correctly This change better reflects that OmniLLM and AsyncOmniLLM are the main entry points for vLLM-omni functionality, rather than core implementation details. --- examples/basic/simple_usage.py | 2 +- vllm_omni/__init__.py | 2 +- vllm_omni/entrypoints/api_server.py | 2 +- vllm_omni/entrypoints/omni.py | 2 +- vllm_omni/{core => entrypoints}/omni_llm.py | 2 +- vllm_omni/plugin.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename vllm_omni/{core => entrypoints}/omni_llm.py (99%) diff --git a/examples/basic/simple_usage.py b/examples/basic/simple_usage.py index 573548180..a6a9b5179 100644 --- a/examples/basic/simple_usage.py +++ b/examples/basic/simple_usage.py @@ -7,7 +7,7 @@ with a single AR (Autoregressive) stage. """ import asyncio -from vllm_omni.core.omni_llm import OmniLLM, AsyncOmniLLM +from vllm_omni.entrypoints.omni_llm import OmniLLM, AsyncOmniLLM from vllm_omni.config import create_ar_stage_config diff --git a/vllm_omni/__init__.py b/vllm_omni/__init__.py index 2cdd71b1f..fb544b0fa 100644 --- a/vllm_omni/__init__.py +++ b/vllm_omni/__init__.py @@ -14,7 +14,7 @@ __author__ = "vLLM-omni Team" __email__ = "hsliuustc@gmail.com" # Main entry points -from .core.omni_llm import OmniLLM, AsyncOmniLLM +from .entrypoints.omni_llm import OmniLLM, AsyncOmniLLM from .config import ( OmniStageConfig, DiTConfig, diff --git a/vllm_omni/entrypoints/api_server.py b/vllm_omni/entrypoints/api_server.py index 2a74047b6..af14fbf08 100644 --- a/vllm_omni/entrypoints/api_server.py +++ b/vllm_omni/entrypoints/api_server.py @@ -9,7 +9,7 @@ from fastapi.responses import JSONResponse from pydantic import BaseModel import uvicorn -from ..core.omni_llm import AsyncOmniLLM +from .omni_llm import AsyncOmniLLM class GenerateRequest(BaseModel): diff --git a/vllm_omni/entrypoints/omni.py b/vllm_omni/entrypoints/omni.py index 5b6b17deb..a0d9865aa 100644 --- a/vllm_omni/entrypoints/omni.py +++ b/vllm_omni/entrypoints/omni.py @@ -5,7 +5,7 @@ Omni serve command for vLLM-omni. import argparse import asyncio from typing import List, Optional -from vllm_omni.core.omni_llm import AsyncOmniLLM +from .omni_llm import AsyncOmniLLM from vllm_omni.config import create_ar_stage_config, create_dit_stage_config, DiTConfig diff --git a/vllm_omni/core/omni_llm.py b/vllm_omni/entrypoints/omni_llm.py similarity index 99% rename from vllm_omni/core/omni_llm.py rename to vllm_omni/entrypoints/omni_llm.py index f25f8d929..fc94aac54 100644 --- a/vllm_omni/core/omni_llm.py +++ b/vllm_omni/entrypoints/omni_llm.py @@ -10,7 +10,7 @@ from vllm.outputs import RequestOutput, LoRARequest from ..config import OmniStageConfig -from .stage_manager import StageManager +from ..core.stage_manager import StageManager from ..engine.output_processor import MultimodalOutputProcessor diff --git a/vllm_omni/plugin.py b/vllm_omni/plugin.py index 732cdc474..61be4a92f 100644 --- a/vllm_omni/plugin.py +++ b/vllm_omni/plugin.py @@ -3,7 +3,7 @@ vLLM plugin system for vLLM-omni integration. """ from typing import Dict, Any, Optional -from vllm_omni.core.omni_llm import OmniLLM, AsyncOmniLLM +from vllm_omni.entrypoints.omni_llm import OmniLLM, AsyncOmniLLM from vllm_omni.config import create_ar_stage_config, create_dit_stage_config