How ixi-enki/vllm-omni works
1. Overall shape
- This repository is a multimodal serving framework built around the vllm_omni Python package.
- It supports two major execution families: autoregressive (AR) models and diffusion / DiT-style models, with shared serving, scheduling, and deployment concepts across both.
2. User-facing entrypoints
- Requests typically enter through vllm_omni/entrypoints, especially the OpenAI-compatible API server and the CLI serve/benchmark commands.
- The repository also includes many offline and online example clients under examples/, plus ComfyUI integration under apps/ComfyUI-vLLM-Omni.
3. Core orchestration layer
- The vllm_omni/engine package is the control plane for request lifecycle, stage startup, stage pools, output processing, and orchestrating multi-stage execution.
- This layer is where the system decides how a request is split, routed, resumed, streamed, or completed across one or more model stages.
4. Autoregressive serving path
- AR serving is centered in vllm_omni/worker, vllm_omni/model_executor, vllm_omni/core/sched, and vllm_omni/inputs.
- model_executor contains model implementations and pipelines for audio/text/omni models such as Qwen3-Omni, Qwen3-TTS, GLM-TTS, Fish-Speech, Voxtral, CosyVoice, Mimo-Audio, and others.
- stage_input_processors convert high-level requests into stage-specific tensors or tokens before execution.
5. Diffusion serving path
- Diffusion workloads are handled separately under vllm_omni/diffusion.
- This subtree contains its own request objects, scheduler, engine, worker, model loader, model registry, and many model-specific pipelines for image/video/audio generation.
- It is not just “another model family”; it has its own execution model for step-based generation, batching, caching, and optional distributed VAE/parallel decoding.
6. Distributed and disaggregated execution
- A major architectural boundary is vllm_omni/distributed, which implements OmniConnector-based disaggregation and cross-stage data transfer.
- omni_coordinator manages coordination and load balancing, while omni_connectors provides connector implementations such as shared memory, Mooncake, and Yuanrong transfer backends.
- This is the layer that enables fully disaggregated stage placement and dynamic resource allocation across hubs/stages.
7. Pipeline and model composition
- Model-specific pipelines live in vllm_omni/model_executor/models and vllm_omni/diffusion/models.
- These pipelines encode the exact dataflow for each supported model family: tokenizer/preprocess → model inference → decoder/vocoder/renderer → output packaging.
- The architecture is intentionally plugin-like: the common runtime stays generic while model logic is isolated per pipeline and per modality.
8. Cross-cutting model features
- vllm_omni/lora and diffusion LoRA code provide adapter-style fine-tuning support.
- vllm_omni/quantization and diffusion quantization modules handle multiple quantization formats and adapters.
- vllm_omni/utils/speaker_cache.py, media utilities, and output templates support shared multimodal concerns such as speaker identity, audio handling, and output normalization.
9. Platform and hardware boundaries
- Hardware-specific adaptations are isolated under vllm_omni/platforms, with distinct support for CUDA, ROCm, MUSA, NPU, and XPU.
- These platform packages provide specialized workers, profiling, quantization hooks, and in some cases connector or model patches.
- This makes platform support a first-class architectural boundary rather than a thin compatibility layer.
10. Deployment and configuration
- Deployment manifests live in vllm_omni/deploy/, with YAMLs tailored to specific model families and replica/topology choices.
- stage_configs, config, and transformers_utils define how model/stage behavior is parameterized and mapped from external configs.
- Example shell scripts and YAMLs in .buildkite/, docker/, and recipes/ reflect the supported deployment matrix and production test setups.
11. Serving API surface
- The OpenAI-compatible server exposes multimodal endpoints for chat, audio generation, speech, image generation/editing, and video streaming.
- Under vllm_omni/entrypoints/openai, protocol definitions and endpoint handlers translate HTTP/WebSocket requests into internal stage requests and streaming responses.
12. Validation, benchmarking, and regression
- benchmarks/ contains accuracy/performance tooling for TTS, diffusion, serving, and distributed scenarios.
- tests/ is extensive and mirrors the architecture: entrypoints, engine, diffusion, distributed connectors, model executors, platform overrides, and end-to-end serving.
- This indicates the repo is designed as a production serving system with strong regression coverage across model families and hardware backends.
13. Docs and operational knowledge
- docs/ and recipes/ are part of the architecture because they codify supported model flows, deployment patterns, and feature boundaries.
- The docs are organized around serving APIs, configuration, examples, diffusion parallelism, omni connectors, and model onboarding, which closely match the code structure.
14. Typical data flow
- A request enters the API/CLI layer, gets normalized into an internal request object, is routed by the engine/orchestrator into one or more stages, processed by model-specific executors, and then serialized back as text, audio, image, or video output.
- For distributed runs, intermediate tensors or KV-like artifacts may cross process/node boundaries through OmniConnectors or stage-to-stage IPC.
- For diffusion, the flow is step-oriented rather than token-oriented, but the same high-level pattern applies: request normalization → scheduler → worker/pipeline → postprocessing → streaming or final response.
Main entry points: orchestrator.py Engine core · gpu_ar_worker.py AR worker · diffusion_engine.py Diffusion engine · diffusion_worker.py Diffusion worker
Components 23
Serving entrypoints
Public API, CLI, and client-facing request entrypaths.
- OpenAI API · OpenAI-compatible HTTP/WebSocket server and multimodal endpoint handlers.
vllm_omni/entrypoints/openai/api_server.py - CLI serve · Command-line serve and benchmark entrypoints.
vllm_omni/entrypoints/cli/main.py - Async Omni · Async request entry and top-level omni serving glue.
vllm_omni/entrypoints/async_omni.py
Core orchestration
Lifecycle management, request routing, and stage coordination.
- Engine core · Request lifecycle, stage startup, output handling, and multi-stage execution.
vllm_omni/engine/orchestrator.py - Stage pool · Stage process management and startup coordination.
vllm_omni/engine/stage_pool.py - Output proc · Streaming, modality, and final response assembly.
vllm_omni/engine/output_processor.py
Autoregressive path
AR serving stack for text, audio, and omni model families.
- AR scheduler · Autoregressive scheduling and prefix-cache coordination.
vllm_omni/core/sched/omni_ar_scheduler.py - Stage inputs · Request-to-stage normalization and tensor/token preparation.
vllm_omni/model_executor/stage_input_processors - AR pipelines · Autoregressive model families and their token/audio/text pipelines.
vllm_omni/model_executor/models - AR worker · GPU/accelerator AR execution and model runner layer.
vllm_omni/worker/gpu_ar_worker.py
Diffusion path
Step-based diffusion/DiT serving stack and model pipelines.
- Diffusion request · Diffusion-specific request and batch structures.
vllm_omni/diffusion/request.py - Diffusion scheduler · Step-oriented request and execution scheduling for diffusion workloads.
vllm_omni/diffusion/sched/step_scheduler.py - Diffusion engine · Diffusion control plane for batching, stepping, and worker orchestration.
vllm_omni/diffusion/diffusion_engine.py - Diffusion worker · Model runner, input batching, and execution backend for diffusion inference.
vllm_omni/diffusion/worker/diffusion_worker.py - Diffusion models · Model-specific diffusion pipelines, transformers, attention, caching, LoRA, and loaders.
vllm_omni/diffusion/models
Distributed transport
Disaggregation, connectors, and coordinator for multi-stage placement.
- Omni connectors · Stage-to-stage transfer adapters and KV/data movement backends.
vllm_omni/distributed/omni_connectors - Coordinator · Hub/stage coordination, placement, and load balancing for disaggregated runs.
vllm_omni/distributed/omni_coordinator/omni_coordinator.py
Platform support
Hardware-specific workers, profiling, and backend adaptations.
- CUDA path · CUDA platform integration and default GPU backend behavior.
vllm_omni/platforms/cuda/platform.py - NPU path · NPU-specific workers, quantization hooks, and connector adaptations.
vllm_omni/platforms/npu/platform.py - XPU path · XPU-specific workers and profiler hooks.
vllm_omni/platforms/xpu/platform.py
Extensions and ops
Deployment, configuration, docs, examples, and validation assets.
- Deploy configs · Deployment YAMLs and stage topology presets for supported model families.
vllm_omni/deploy - Docs · Architecture, API, configuration, and model onboarding documentation.
docs - Examples · Offline and online example clients, workflows, and integration demos.
examples
Connections 22
- OpenAI API → Engine core: submits requests · HTTP/WebSocket requests are normalized into internal execution requests.
- CLI serve → Engine core: starts serve · CLI commands bootstrap the serving engine and benchmark flows.
- Async Omni → Engine core: dispatches · Async entrypoint hands control to the orchestration layer.
- Engine core → Stage pool: spawns stages · Engine manages stage process lifecycle and startup.
- Engine core → Output proc: formats outputs · Engine delegates response shaping and streaming assembly.
- Engine core → AR scheduler: AR scheduling · Autoregressive requests are scheduled through the token scheduler.
- Engine core → Diffusion engine: diffusion route · Diffusion requests follow the dedicated diffusion runtime.
- AR scheduler → Stage inputs: prepares stages · Scheduler cooperates with stage input processors for execution-ready inputs.
- Stage inputs → AR pipelines: feeds pipelines · Prepared inputs enter model-specific AR pipelines.
- AR pipelines → AR worker: executes on · AR model pipelines run inside worker/model-runner backends.
- Diffusion engine → Diffusion request: normalizes · Diffusion runtime uses diffusion-native request structures.
- Diffusion engine → Diffusion scheduler: schedules steps · Step scheduler coordinates batching and generation steps.
- Diffusion scheduler → Diffusion worker: drives workers · Scheduled steps are executed by diffusion workers.
- Diffusion worker → Diffusion models: runs pipelines · Workers invoke model-specific diffusion pipelines and loaders.
- Omni connectors → Coordinator: reports state · Connectors and transfer adapters are coordinated via the disaggregation control plane.
- Coordinator → Engine core: placement control · Coordinator influences stage placement and cross-stage execution.
- AR worker → CUDA path: GPU backend · Default GPU execution path is provided by CUDA platform support.
- AR worker → NPU path: NPU backend · NPU-specific worker implementations and kernels override the generic path.
- AR worker → XPU path: XPU backend · XPU-specific worker implementations and profiling hooks integrate here.
- Diffusion worker → CUDA path: GPU backend · Diffusion execution uses platform backends, commonly CUDA.
- Docs → Deploy configs: documents · Docs describe deployment matrices and stage topology presets.
- Examples → OpenAI API: exercises · Example clients and workflows target the public serving API.