From e267ca0beb5945c3b22a11ca8e652c9f3aabecbc Mon Sep 17 00:00:00 2001 From: CHEN Xi <78632976+RubiaCx@users.noreply.github.com> Date: Mon, 5 Jan 2026 10:20:30 +0800 Subject: [PATCH] [diffusion] doc: document LoRA support in CLI (#16375) --- python/sglang/multimodal_gen/README.md | 13 +++++++++++++ python/sglang/multimodal_gen/docs/cli.md | 2 ++ 2 files changed, 15 insertions(+) diff --git a/python/sglang/multimodal_gen/README.md b/python/sglang/multimodal_gen/README.md index 9a63e6aaa..6acdcffa1 100644 --- a/python/sglang/multimodal_gen/README.md +++ b/python/sglang/multimodal_gen/README.md @@ -64,6 +64,19 @@ sglang generate --model-path Wan-AI/Wan2.1-T2V-1.3B-Diffusers \ --save-output ``` +### LoRA support + +Apply LoRA adapters via `--lora-path`: + +```bash +sglang generate \ + --model-path Qwen/Qwen-Image-Edit-2511 \ + --lora-path prithivMLmods/Qwen-Image-Edit-2511-Anime \ + --prompt "Transform into anime." \ + --image-path "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png" \ + --save-output +``` + For more usage examples (e.g. OpenAI compatible API, server mode), check [cli.md](https://github.com/sgl-project/sglang/tree/main/python/sglang/multimodal_gen/docs/cli.md). ## Contributing diff --git a/python/sglang/multimodal_gen/docs/cli.md b/python/sglang/multimodal_gen/docs/cli.md index 8779ccd28..f44ae3064 100644 --- a/python/sglang/multimodal_gen/docs/cli.md +++ b/python/sglang/multimodal_gen/docs/cli.md @@ -14,6 +14,8 @@ The SGLang-diffusion CLI provides a quick way to access the inference pipeline f - `--model-path {MODEL_PATH}`: Path to the model or model ID - `--vae-path {VAE_PATH}`: Path to a custom VAE model or HuggingFace model ID (e.g., `fal/FLUX.2-Tiny-AutoEncoder`). If not specified, the VAE will be loaded from the main model path. +- `--lora-path {LORA_PATH}`: Path to a LoRA adapter (local path or HuggingFace model ID). If not specified, LoRA will not be applied. +- `--lora-nickname {NAME}`: Nickname for the LoRA adapter. (default: `default`). - `--num-gpus {NUM_GPUS}`: Number of GPUs to use - `--tp-size {TP_SIZE}`: Tensor parallelism size (only for the encoder; should not be larger than 1 if text encoder offload is enabled, as layer-wise offload plus prefetch is faster) - `--sp-degree {SP_SIZE}`: Sequence parallelism size (typically should match the number of GPUs)