2026-04-17 19:10:02 +08:00
# Ming-flash-omni 2.0
2026-04-23 12:04:52 +08:00
[Ming-flash-omni-2.0 ](https://github.com/inclusionAI/Ming ) is an omni-modal model supporting text, image, video, and audio understanding, with text and speech outputs.
2026-05-27 23:21:20 +08:00
vLLM-Omni supports three deployment modes:
2026-04-23 12:04:52 +08:00
2026-05-03 10:43:49 +08:00
| Mode | Deploy config | Output |
|------|--------------|--------|
| Thinker + Talker (omni-speech, default) | `vllm_omni/deploy/ming_flash_omni.yaml` | Text + Audio |
| Thinker only (multimodal understanding) | `vllm_omni/deploy/ming_flash_omni_thinker_only.yaml` | Text |
2026-05-27 23:21:20 +08:00
| Thinker + Imagegen (text-to-image / img2img) | `vllm_omni/model_executor/stage_configs/ming_flash_omni_dual.yaml` | Image (online-serving only at the moment) |
2026-04-23 12:04:52 +08:00
2026-05-05 13:36:16 -04:00
For standalone TTS (talker only), see the [Ming-flash-omni-TTS section in the Text-To-Speech hub ](../text_to_speech/README.md#ming-flash-omni-tts ).
2026-04-17 19:10:02 +08:00
## Setup
Please refer to the [stage configuration documentation ](https://docs.vllm.ai/projects/vllm-omni/en/latest/configuration/stage_configs/ ) to configure memory allocation appropriately for your hardware setup.
2026-05-03 10:43:49 +08:00
When no `--deploy-config` is passed, the model registry auto-loads the full thinker+talker `vllm_omni/deploy/ming_flash_omni.yaml` (See [Omni-Speech ](#omni-speech-thinker--talker )).
For text-only output without spinning up the talker, pass:
2026-04-23 12:04:52 +08:00
```bash
2026-05-03 10:43:49 +08:00
--deploy-config vllm_omni/deploy/ming_flash_omni_thinker_only.yaml
2026-04-23 12:04:52 +08:00
```
2026-04-17 19:10:02 +08:00
## Run examples
2026-05-03 10:43:49 +08:00
The end-to-end script defaults to built-in assets; pass `--image-path` , `--audio-path` , or `--video-path` to override.
### Multi-Modality Understanding (Standalone Thinker)
Here we pass thinker-only deploy yaml:
2026-04-23 12:04:52 +08:00
2026-04-17 19:10:02 +08:00
```bash
2026-05-03 10:43:49 +08:00
python examples/offline_inference/ming_flash_omni/end2end.py --deploy-config vllm_omni/deploy/ming_flash_omni_thinker_only.yaml --query-type text
python examples/offline_inference/ming_flash_omni/end2end.py --deploy-config vllm_omni/deploy/ming_flash_omni_thinker_only.yaml --query-type use_image
python examples/offline_inference/ming_flash_omni/end2end.py --deploy-config vllm_omni/deploy/ming_flash_omni_thinker_only.yaml --query-type use_audio
python examples/offline_inference/ming_flash_omni/end2end.py --deploy-config vllm_omni/deploy/ming_flash_omni_thinker_only.yaml --query-type use_video --num-frames 16
2026-04-17 19:10:02 +08:00
```
2026-05-03 10:43:49 +08:00
### Reasoning (Thinking Mode)
2026-04-17 19:10:02 +08:00
2026-04-23 12:04:52 +08:00
Reasoning ("detailed thinking on") is applied by the script when
`--query-type reasoning` is set. The default prompt matches Ming's cookbook
and expects the reference figure from the upstream repo — see
`get_reasoning_query` in `end2end.py` .
2026-04-17 19:10:02 +08:00
```bash
2026-05-03 10:43:49 +08:00
python examples/offline_inference/ming_flash_omni/end2end.py \
--deploy-config vllm_omni/deploy/ming_flash_omni_thinker_only.yaml \
--query-type reasoning \
--image-path ./3_0.png
2026-04-17 19:10:02 +08:00
```
2026-05-03 10:43:49 +08:00
### Omni-Speech (Thinker + Talker)
2026-04-17 19:10:02 +08:00
2026-05-03 10:43:49 +08:00
The default deploy YAML already runs thinker+talker, so spoken output only requires requesting `audio` (or `text,audio` ) modalities.
2026-04-23 12:04:52 +08:00
The thinker processes your multimodal input, generates text, then the talker synthesises the response as speech.
**Audio-only output** (speech response, no text):
```bash
python examples/offline_inference/ming_flash_omni/end2end.py \
--query-type text \
--modalities audio \
--output-dir output_ming_omni_speech
2026-04-17 19:10:02 +08:00
```
2026-04-23 12:04:52 +08:00
**Both text and audio output** :
2026-04-17 19:10:02 +08:00
```bash
2026-04-23 12:04:52 +08:00
python examples/offline_inference/ming_flash_omni/end2end.py \
--query-type use_audio \
--modalities text,audio \
--output-dir output_ming_omni_speech
2026-04-17 19:10:02 +08:00
```
2026-04-23 12:04:52 +08:00
Generated `.wav` files are saved to `--output-dir` (default `output_ming` ), one per request.
2026-04-17 19:10:02 +08:00
2026-05-03 10:43:49 +08:00
The default deploy YAML allocates thinker on GPUs 0– 3 and talker on GPU 3 for a common device topology (4 rather than 5 devices that talker on its own device). Adjust `devices` in a copied YAML and pass it via `--deploy-config` to match your hardware or requirements.
2026-04-17 19:10:02 +08:00
### Modality control
2026-04-23 12:04:52 +08:00
| `--modalities` | Thinker output | Talker | Saved files |
|---------------|----------------|--------|-------------|
| `text` (default) | Text | Not run | `<id>.txt` |
| `audio` | Text (internal) | Runs | `<id>.wav` |
| `text,audio` | Text | Runs | `<id>.txt` + `<id>.wav` |
2026-04-17 19:10:02 +08:00
2026-05-03 10:43:49 +08:00
Pass `--deploy-config /path/to/your_deploy.yaml` to any of the commands above to override the bundled deploy config.
2026-04-17 19:10:02 +08:00
2026-05-27 23:21:20 +08:00
### Image generation (text-to-image / img2img)
The diffusion-stage image-generation path is currently only wired through
the online OpenAI-compatible chat endpoint (`/v1/chat/completions` with
`"modalities": ["image"]` ). For payloads, optional knobs
(`steps` /`cfg` /`seed` /`byte5_text` /`negative_prompt` ), and the img2img
reference-image flow, see the
[image-gen section in the online-serving README ](../../online_serving/ming_flash_omni/README.md#image-generation-text-to-image ).
`end2end.py` does not yet exercise the imagegen stage; that is tracked as
follow-up work.
2026-04-17 19:10:02 +08:00
## Online serving
For online serving via the OpenAI-compatible API, see [examples/online_serving/ming_flash_omni/README.md ](../../online_serving/ming_flash_omni/README.md ).