File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
181176This project is derived from [ radixark/miles #544 ] ( https://github.com/radixark/miles/pull/544 ) . Thanks to the original authors.
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " sglang-diffusion-routing"
7- version = " 0.1.0 "
7+ version = " 0.1.1 "
88description = " Load-balancing router for SGLang diffusion workers"
99readme = " README.md"
1010requires-python = " >=3.10"
You can’t perform that action at this time.
0 commit comments