1. Model Introduction
LongCat-Image is a text-to-image model from Meituan. SGLang runs its Qwen2.5-VL prompt rewriter in process with the native SGLang runtime before text encoding and denoising. The native pipeline keeps prompt rewriting and diffusion behind one OpenAI-compatible image endpoint. Rewriting is enabled by default for stronger prompt expansion, but each request can disable it when lower latency matters more than the rewritten prompt.2. Installation
Install SGLang with the diffusion dependencies:Command
3. Serve the model
Command
enable_prompt_rewrite=false on a request when lower latency is more important
than rewritten prompt quality.
4. Generate an image
Python
extra_body:
Python
5. Memory placement
Use the unified component-residency selector when the complete pipeline does not fit on the accelerator. For example, keep the repeatedly used DiT resident while moving auxiliary components to CPU between stages:Command
