Skip to content

Commit 4535662

Browse files
authored
Update CLI commands and prompts in documentation (#247)
1 parent b614856 commit 4535662

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

blog/2025-11-07-sglang-diffusion.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,22 @@ uv pip install -e "python[diffusion]" --prerelease=allow
7979

8080
Launch a server and then send requests:
8181
```bash
82-
sglang serve --model-path black-forest-labs/FLUX.1-dev
82+
sglang serve --model-path black-forest-labs/FLUX.1-dev --port 3000
8383

84-
curl -s -D >(grep -i x-request-id >&2) \
85-
-o >(jq -r '.data[0].b64_json' | base64 --decode > meme.png) \
86-
-X POST "$OPENAI_API_BASE/images/edits" \
84+
curl http://127.0.0.1:3000/v1/images/generations \
85+
-o >(jq -r '.data[0].b64_json' | base64 --decode > example.png) \
86+
-H "Content-Type: application/json" \
8787
-H "Authorization: Bearer $OPENAI_API_KEY" \
88-
-F "model=Qwen/Qwen-Image-Edit" \
89-
-F "image[][email protected]" \
90-
-F 'prompt=Create a meme based on image provide'
88+
-d '{
89+
"model": "black-forest-labs/FLUX.1-dev",
90+
"prompt": "A cute baby sea otter",
91+
"n": 1,
92+
"size": "1024x1024",
93+
"response_format": "b64_json"
94+
}'
9195
```
9296

93-
Or, Generate an image without launching a server:
97+
Or, generate an image without launching a server:
9498
```bash
9599
sglang generate --model-path black-forest-labs/FLUX.1-dev \
96100
--prompt "A Logo With Bold Large Text: SGL Diffusion" \
@@ -119,10 +123,10 @@ Fallback link: <a href="https://github.com/lm-sys/lm-sys.github.io/releases/down
119123
#### Image to Video: Wan-AI/Wan2.1-I2V
120124

121125
```bash
122-
sglang generate --model-path=Wan-AI/Wan2.1-I2V-14B-480P-Diffusers \
126+
sglang generate --model-path=Wan-AI/Wan2.1-I2V-14B-480P-Diffusers \
123127
--prompt="Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside." \
124128
--image-path="https://github.com/Wan-Video/Wan2.2/blob/990af50de458c19590c245151197326e208d7191/examples/i2v_input.JPG?raw=true" \
125-
--save-output --num-gpus 2 --enable-cfg-parallel
129+
--num-gpus 2 --enable-cfg-parallel --save-output
126130
```
127131

128132
<video width="800" controls poster="https://via.placeholder.com/800x450?text=Video+Preview" style="display:block; margin: auto; width: 80%;">
@@ -149,8 +153,7 @@ sglang generate --model-path black-forest-labs/FLUX.1-dev \
149153
```bash
150154
sglang generate --model-path=Qwen/Qwen-Image \
151155
--prompt='A curious raccoon' \
152-
--width=720 --height=720 \
153-
--save-output \
156+
--width=720 --height=720 --save-output
154157
```
155158

156159
<img src="https://github.com/lm-sys/lm-sys.github.io/releases/download/test/T2I_Qwen_Image.jpg" alt="Text to Image: FLUX" style="display:block; margin-top: 20px; width: 65%;">
@@ -160,9 +163,9 @@ sglang generate --model-path=Qwen/Qwen-Image \
160163

161164

162165
```bash
163-
sglang generate \
164-
--prompt="Convert 2D style to 3D style" --image-path="https://github.com/lm-sys/lm-sys.github.io/releases/download/test/TI2I_Qwen_Image_Edit_Input.jpg" --model-path=Qwen/Qwen-Image-Edit \
165-
--width=1024 --height=1536 --save-output
166+
sglang generate --model-path=Qwen/Qwen-Image-Edit \
167+
--prompt="Convert 2D style to 3D style" --image-path="https://github.com/lm-sys/lm-sys.github.io/releases/download/test/TI2I_Qwen_Image_Edit_Input.jpg" \
168+
--width=1024 --height=1536 --save-output
166169
```
167170

168171

0 commit comments

Comments
 (0)