1. Model Introduction
ERNIE-Image is Baidu’s text-to-image family with separate standard and Turbo checkpoints. The standard model is the quality-oriented path; Turbo is the lower-latency choice, and both load through SGLang’s nativeErnieImagePipeline.
This integration currently targets text-only image generation rather than image editing or reference conditioning. Choose it for a straightforward single-GPU T2I deployment; use a dedicated editing model when preserving source-image structure is part of the task.
2. Installation
Follow the SGLang Diffusion installation guide. Docker is recommended for Linux GPU deployments; run the commands below inside the container or your installed Python environment.3. Serve the model
The commands below target a single supported NVIDIA CUDA or AMD ROCm GPU. Start with--performance-mode auto; use speed only when the full pipeline fits comfortably on the selected GPU(s), and use memory when you need lower peak GPU memory.
Serve ERNIE-Image:
Command
Command
4. Generate an image
Use the OpenAI-compatible image generation API after the server starts:Python
5. Configuration tips
- ERNIE-Image is a text-to-image pipeline; do not pass
--image-path. --performance-mode autokeeps conservative defaults while preserving explicit user flags.- If the checkpoint includes a PE component, SGLang loads it automatically with the native Ministral3 runtime. Use
--layerwise-offload-components pewhen the local PE decoder needs to trade latency for lower GPU memory usage. - Treat FSDP, SP/Ulysses/Ring, and TP as explicit benchmark knobs. Measure the target resolution, step count, and GPU type before making them production defaults.
