Adds Lance (bytedance-research/Lance), a 3B unified AR+diffusion multimodal model on a Qwen2.5-VL backbone. Lance is BAGEL-lineage: it reuses vLLM-Omni's BAGEL Mixture-of-Transformers core verbatim and specializes only the ViT (Qwen2.5-VL vision), the VAE (Wan2.2) and the checkpoint layout. All six single-stage Lance modalities verified end-to-end on 1x B300: t2i, t2v, image_edit, video_edit, x2t_image (image understanding) and x2t_video (video understanding). 3-D mRoPE is wired through BagelRotaryEmbedding for the x2t / video / edit paths. Includes the upstream gap-analysis quality fixes (task-specific system prompts, full Qwen chat template, upstream inference defaults and aspect-ratio buckets). Ships an offline example (examples/offline_inference/lance/), an OpenAI-compatible online-serving example (examples/online_serving/lance/) and an e2e test (tests/e2e/online_serving/test_lance.py). See LANCE_PR.md for the architecture rationale, per-modality status and the two remaining follow-ups (two-stage AR+DiT, video_edit polish). Closes #3697. Signed-off-by: lishunyang <lishunyang03@gmail.com>
41 lines
1.2 KiB
Markdown
41 lines
1.2 KiB
Markdown
# Lance — online serving
|
|
|
|
OpenAI-compatible chat completions API for Lance, served by `vllm-omni`.
|
|
|
|
## Start the server
|
|
|
|
```bash
|
|
bash examples/online_serving/lance/run_server.sh
|
|
# or, with overrides
|
|
MODEL=bytedance-research/Lance \
|
|
DEPLOY_CONFIG=vllm_omni/deploy/lance.yaml \
|
|
PORT=8091 \
|
|
bash examples/online_serving/lance/run_server.sh
|
|
```
|
|
|
|
The default deploy config is the single-stage `lance.yaml`; for `video_edit`
|
|
or `text2video` workloads, point ``DEPLOY_CONFIG`` at a video-checkpoint
|
|
config (or pass ``--model bytedance-research/Lance/Lance_3B_Video`` to
|
|
`run_server.sh`).
|
|
|
|
## Send a request
|
|
|
|
```bash
|
|
# text-to-image
|
|
python examples/online_serving/lance/openai_chat_client.py \
|
|
--prompt "A cute corgi astronaut on the moon, cinematic" \
|
|
--modality text2img \
|
|
--output corgi.png
|
|
|
|
# image edit
|
|
python examples/online_serving/lance/openai_chat_client.py \
|
|
--prompt "Convert this into a vibrant cartoon-style illustration" \
|
|
--modality img2img \
|
|
--image-url path/to/photo.png \
|
|
--output edited.png
|
|
```
|
|
|
|
The client is shared with BAGEL — same OpenAI message format, same
|
|
``modalities`` and ``num_inference_steps`` / ``seed`` / ``height`` /
|
|
``width`` knobs.
|