[diffusion] endpoint: add API endpoint to query loaded LoRA adapters information (#16533)

This commit is contained in:
Fan Lin
2026-01-08 13:51:26 +08:00
committed by GitHub
parent 4935344fcd
commit 41b434a7e6
8 changed files with 163 additions and 0 deletions
@@ -252,6 +252,19 @@ class GPUWorker:
self.pipeline.unmerge_lora_weights(target)
return OutputBatch()
def list_loras(self) -> OutputBatch:
"""
List loaded LoRA adapters and current application status per module.
"""
from sglang.multimodal_gen.runtime.pipelines_core.lora_pipeline import (
LoRAPipeline,
)
if not isinstance(self.pipeline, LoRAPipeline):
return OutputBatch(error="Lora is not enabled")
status = self.pipeline.get_lora_status()
return OutputBatch(output=status)
def run_scheduler_process(
local_rank: int,