[Misc] Make gradio an optional dependency and upgrade to >=6.7.0 (#2221)

Signed-off-by: Lidang-Jiang <lidangjiang@gmail.com>
Signed-off-by: Lidang Jiang <lidangjiang@gmail.com>
This commit is contained in:
Lidang Jiang authored and GitHub committed 2026-03-28 12:33:55 -04:00
1 parent 283a62fd76
commit 168bea2440
19 files changed
+114 -10

No files matched your search

@@ -29,6 +29,11 @@ uv pip install vllm --torch-backend=auto
uv pip install vllm-omni
```
To run Gradio demos, also install the optional extras:
```bash
uv pip install 'vllm-omni[demo]'
```
# --8<-- [end:pre-built-wheels]
# --8<-- [start:build-wheel-from-source]
@@ -50,6 +55,11 @@ cd vllm-omni
uv pip install -e .
```
To run Gradio demos, install with optional extras:
```bash
uv pip install -e '.[demo]'
```
<details><summary>(Optional) Installation of vLLM from source</summary>
If you want to check, modify or debug with source code of vLLM, install the library from source with the following instructions:
@@ -256,6 +256,15 @@ lora_adapter/
## Web UI Demo
!!! note "Gradio is an optional dependency"
The Gradio demo requires the `[demo]` extras. Install them first:
```bash
pip install 'vllm-omni[demo]'
```
Or, if installing from source: `pip install -e '.[demo]'`
Launch the Gradio demo:
```bash
@@ -11,6 +11,15 @@ Source <https://github.com/vllm-project/vllm-omni/tree/main/examples/online_serv
## Gradio Demo
!!! note "Gradio is an optional dependency"
The Gradio demo requires the `[demo]` extras. Install them first:
```bash
pip install 'vllm-omni[demo]'
```
Or, if installing from source: `pip install -e '.[demo]'`
An interactive Gradio demo is available with text-to-speech synthesis, voice cloning, and streaming support.
```bash
@@ -122,6 +122,15 @@ python openai_chat_client.py --input input1.png input2.png --prompt "Combine the
### Method 4: Using Gradio Demo
!!! note "Gradio is an optional dependency"
The Gradio demo requires the `[demo]` extras. Install them first:
```bash
pip install 'vllm-omni[demo]'
```
Or, if installing from source: `pip install -e '.[demo]'`
```bash
python gradio_demo.py
# Visit http://localhost:7861
@@ -149,6 +149,15 @@ python openai_chat_completion_client_for_multimodal_generation.py \
## Run Local Web UI Demo
!!! note "Gradio is an optional dependency"
The Gradio demo requires the `[demo]` extras. Install them first:
```bash
pip install 'vllm-omni[demo]'
```
Or, if installing from source: `pip install -e '.[demo]'`
This Web UI demo allows users to interact with the model through a web browser.
### Running Gradio Demo
@@ -163,6 +163,15 @@ python openai_chat_completion_client_for_multimodal_generation.py \
## Run Local Web UI Demo
!!! note "Gradio is an optional dependency"
The Gradio demo requires the `[demo]` extras. Install them first:
```bash
pip install 'vllm-omni[demo]'
```
Or, if installing from source: `pip install -e '.[demo]'`
This Web UI demo allows users to interact with the model through a web browser.
### Running Gradio Demo
@@ -19,6 +19,15 @@ Please refer to [README.md](https://github.com/vllm-project/vllm-omni/tree/main/
## Gradio Demo
!!! note "Gradio is an optional dependency"
The Gradio demo requires the `[demo]` extras. Install them first:
```bash
pip install 'vllm-omni[demo]'
```
Or, if installing from source: `pip install -e '.[demo]'`
Two interactive Gradio demos are available, both supporting all 3 task types:
| Demo | File | Transport | Streaming Quality |
@@ -105,6 +105,15 @@ python openai_chat_client.py --prompt "A beautiful landscape painting" --output
### Method 4: Using Gradio Demo
!!! note "Gradio is an optional dependency"
The Gradio demo requires the `[demo]` extras. Install them first:
```bash
pip install 'vllm-omni[demo]'
```
Or, if installing from source: `pip install -e '.[demo]'`
```bash
python gradio_demo.py
# Visit http://localhost:7860
@@ -1,7 +1,10 @@
import argparse
from functools import lru_cache
import gradio as gr
try:
import gradio as gr
except ImportError:
raise ImportError("gradio is required to run this demo. Install it with: pip install 'vllm-omni[demo]'") from None
import torch
from vllm_omni.entrypoints.omni import Omni
@@ -16,7 +16,10 @@ import argparse
import base64
import io
import gradio as gr
try:
import gradio as gr
except ImportError:
raise ImportError("gradio is required to run this demo. Install it with: pip install 'vllm-omni[demo]'") from None
import httpx
import numpy as np
import soundfile as sf
@@ -10,7 +10,10 @@ import argparse
import base64
from io import BytesIO
import gradio as gr
try:
import gradio as gr
except ImportError:
raise ImportError("gradio is required to run this demo. Install it with: pip install 'vllm-omni[demo]'") from None
import requests
from PIL import Image
@@ -6,7 +6,10 @@ import random
from pathlib import Path
from typing import Any
import gradio as gr
try:
import gradio as gr
except ImportError:
raise ImportError("gradio is required to run this demo. Install it with: pip install 'vllm-omni[demo]'") from None
import numpy as np
import soundfile as sf
import torch
@@ -6,7 +6,10 @@ import random
from pathlib import Path
from typing import Any
import gradio as gr
try:
import gradio as gr
except ImportError:
raise ImportError("gradio is required to run this demo. Install it with: pip install 'vllm-omni[demo]'") from None
import numpy as np
import soundfile as sf
import torch
@@ -24,7 +24,10 @@ import io
import json
import logging
import gradio as gr
try:
import gradio as gr
except ImportError:
raise ImportError("gradio is required to run this demo. Install it with: pip install 'vllm-omni[demo]'") from None
import httpx
import numpy as np
import soundfile as sf
@@ -3,7 +3,10 @@
import base64
import io
import gradio as gr
try:
import gradio as gr
except ImportError:
raise ImportError("gradio is required to run this demo. Install it with: pip install 'vllm-omni[demo]'") from None
import httpx
import numpy as np
import soundfile as sf
@@ -10,7 +10,10 @@ import argparse
import base64
from io import BytesIO
import gradio as gr
try:
import gradio as gr
except ImportError:
raise ImportError("gradio is required to run this demo. Install it with: pip install 'vllm-omni[demo]'") from None
import requests
from PIL import Image
@@ -20,7 +20,10 @@ from datetime import datetime
from pathlib import Path
from typing import Any
import gradio as gr
try:
import gradio as gr
except ImportError:
raise ImportError("gradio is required to run this demo. Install it with: pip install 'vllm-omni[demo]'") from None
import httpx
import numpy as np
import soundfile as sf
+4
View File
@@ -56,6 +56,10 @@ dev = [
"mistune>=3.2.0", # for example tests
]
demo = [
"gradio>=6.7.0",
]
docs = [
"mkdocs>=1.5.0",
"mkdocs-api-autonav",
+1 -1
View File
@@ -4,7 +4,6 @@ librosa>=0.11.0
resampy>=0.4.3
diffusers>=0.36.0
accelerate==1.12.0
gradio==5.50
soundfile>=0.13.1
cache-dit==1.3.0
tqdm>=4.66.0
@@ -18,3 +17,4 @@ prettytable>=3.8.0
aenum==3.1.16
pyzmq>=25.0.0
janus>=1.0.0
pydub