Skip to content

[codex] diffusion: expose ERNIE use_pe CLI option#23091

Closed
BBuf wants to merge 1 commit intosgl-project:mainfrom
BBuf:codex/diffusion-ernie-use-pe-cli
Closed

[codex] diffusion: expose ERNIE use_pe CLI option#23091
BBuf wants to merge 1 commit intosgl-project:mainfrom
BBuf:codex/diffusion-ernie-use-pe-cli

Conversation

@BBuf
Copy link
Copy Markdown
Collaborator

@BBuf BBuf commented Apr 17, 2026

What

Expose ERNIE's per-request use_pe sampling parameter through the shared sglang generate CLI as --use-pe.

Why

ErnieImageSamplingParams already has use_pe, but one-off CLI runs could not set it without a config file. This makes sglang generate ... --use-pe false work directly while preserving the model default.

H100 Perf

Benchmark: H100 80GB, ERNIE-Image-Turbo, 512x512, 10 steps, use_pe=false, warmup enabled, native SGLang backend. Before uses the config-file workaround; after uses the new CLI flag. Perf JSON is committed under docs/assets/benchmarks/ernie_use_pe_cli/.

metric before after delta
total request 777.118 ms 781.983 ms +0.63%
text encoding 20.015 ms 20.194 ms +0.89%
denoising 746.346 ms 750.860 ms +0.60%
avg denoise step 74.391 ms 74.844 ms +0.61%
peak allocated 31557.84 MB 31557.84 MB +0.00 MB
wall time 35 s 39 s +4 s

Result Images

Before:

before

After:

after

Checks

  • H100: PYTHONPATH=python pytest -q python/sglang/multimodal_gen/test/unit/test_sampling_params.py -k 'ernie_image_cli_path or qwen_image_cli_path or get_cli_args' -> 6 passed
  • H100: sglang generate --use-pe false ERNIE-Image-Turbo, saved image and perf JSON
  • Format: project pre-commit hooks on all changed files -> passed

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions bot added documentation Improvements or additions to documentation diffusion SGLang Diffusion labels Apr 17, 2026
@BBuf BBuf force-pushed the codex/diffusion-ernie-use-pe-cli branch from ce3ac69 to 015ae65 Compare April 17, 2026 19:48
@BBuf BBuf closed this Apr 18, 2026
@BBuf BBuf deleted the codex/diffusion-ernie-use-pe-cli branch April 18, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diffusion SGLang Diffusion documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant