Skip to content

Commit 4a1e953

Browse files
Merge branch 'main' of github.com:zhaochenyang20/sglang-diffusion-routing
2 parents cbb5bf3 + b800c4c commit 4a1e953

2 files changed

Lines changed: 21 additions & 26 deletions

File tree

README.md

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ cd ..
4141

4242
## Quick Start
4343

44+
### Co-launch workers and router via YAML config
45+
46+
Instead of starting workers manually, you can let the router spawn and manage them via a YAML config file.
47+
48+
```bash
49+
sglang-d-router --port 30081 --launcher-config examples/local_launcher.yaml
50+
```
51+
52+
```yaml
53+
launcher:
54+
backend: local
55+
model: Qwen/Qwen-Image
56+
num_workers: 8
57+
num_gpus_per_worker: 1
58+
worker_base_port: 10090
59+
wait_timeout: 600
60+
```
61+
62+
### Manual Launch Workers and Connect to Router
63+
4464
```bash
4565
# If connect to HuggingFace is not allowed
4666
# You can set the environment variable SGLANG_USE_MODELSCOPE=TRUE
@@ -65,7 +85,6 @@ sglang-d-router --port 30081 \
6585

6686
## Demonstrative Examples
6787

68-
6988
### With Python Requests
7089

7190
```python
@@ -152,30 +171,6 @@ curl -X POST http://localhost:30081/update_weights_from_disk \
152171
-d '{"model_path": "Qwen/Qwen-Image-2512"}'
153172
```
154173

155-
### Auto-launch workers via YAML config
156-
157-
Instead of starting workers manually, you can let the router spawn and manage
158-
them through a launcher backend.
159-
160-
**Local subprocess launcher** (`examples/local_launcher.yaml`):
161-
162-
```bash
163-
sglang-d-router --port 30081 --launcher-config examples/local_launcher.yaml
164-
```
165-
166-
```yaml
167-
launcher:
168-
backend: local
169-
model: Qwen/Qwen-Image
170-
num_workers: 2
171-
num_gpus_per_worker: 1
172-
worker_base_port: 10090
173-
wait_timeout: 600
174-
```
175-
176-
Fields not set in the YAML fall back to defaults defined in each backend's
177-
config dataclass (see `LocalLauncherConfig`).
178-
179174
## Acknowledgment
180175

181176
This project is derived from [radixark/miles#544](https://github.com/radixark/miles/pull/544). Thanks to the original authors.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "sglang-diffusion-routing"
7-
version = "0.1.0"
7+
version = "0.1.1"
88
description = "Load-balancing router for SGLang diffusion workers"
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)