[Fix, LoRA] fix LoRA with updates in main (#1545)

This commit is contained in:
Ying Sheng
2024-09-30 10:06:08 -07:00
committed by GitHub
parent 63ba2f8d7b
commit 0f4fb19bc8
5 changed files with 31 additions and 23 deletions

View File

@@ -594,6 +594,16 @@ class ServerArgs:
"Please use sglang<=0.3.2 or wait for later updates."
)
if isinstance(self.lora_paths, list):
lora_paths = self.lora_paths
self.lora_paths = {}
for lora_path in lora_paths:
if "=" in lora_path:
name, path = lora_path.split("=", 1)
self.lora_paths[name] = path
else:
self.lora_paths[lora_path] = lora_path
def prepare_server_args(argv: List[str]) -> ServerArgs:
"""