README.md 1.12 KB
Newer Older
1
2
3
4
5
6
7
8
# Qwen2.5-Omni Offline Inference Examples

This folder provides several example scripts on how to inference Qwen2.5-Omni offline.

## Thinker Only

```bash
# Audio + image + video
Reid's avatar
Reid committed
9
10
python examples/offline_inference/qwen2_5_omni/only_thinker.py \
    -q mixed_modalities
11
12
13

# Read vision and audio inputs from a single video file
# NOTE: V1 engine does not support interleaved modalities yet.
Reid's avatar
Reid committed
14
15
16
VLLM_USE_V1=0 \
python examples/offline_inference/qwen2_5_omni/only_thinker.py \
    -q use_audio_in_video
17
18

# Multiple audios
Reid's avatar
Reid committed
19
20
21
VLLM_USE_V1=0 \
python examples/offline_inference/qwen2_5_omni/only_thinker.py \
    -q multi_audios
22
23
24
25
26
27
28
29
```

This script will run the thinker part of Qwen2.5-Omni, and generate text response.

You can also test Qwen2.5-Omni on a single modality:

```bash
# Process audio inputs
Reid's avatar
Reid committed
30
31
python examples/offline_inference/audio_language.py \
    --model-type qwen2_5_omni
32
33

# Process image inputs
Reid's avatar
Reid committed
34
35
36
python examples/offline_inference/vision_language.py \
    --modality image \
    --model-type qwen2_5_omni
37
38

# Process video inputs
Reid's avatar
Reid committed
39
40
41
python examples/offline_inference/vision_language.py \
    --modality video \
    --model-type qwen2_5_omni
42
```