Fix lora batch processing when input lora_path contains None (#5930)

This commit is contained in:
Qiaolin Yu
2025-04-30 22:42:42 -04:00
committed by GitHub
parent 11383cec3c
commit 7bcd8b1cb2
4 changed files with 60 additions and 279 deletions

View File

@@ -423,9 +423,9 @@ class HFRunner:
)
del input_logits
if lora_paths is not None and lora_paths[i] is not None:
# Unload the LoRA adapter if it is used
model.unload()
if lora_paths is not None and lora_paths[i] is not None:
# Unload the LoRA adapter if it is used
model.unload()
return ModelOutput(
output_strs=output_strs,