Support limiting max loaded loras in CPU. (#8650)

This commit is contained in:
Lifu Huang authored and GitHub committed 2025-08-03 00:02:23 -07:00
1 parent a437aa9987
commit 8675bdf246
8 files changed
+163 -58

No files matched your search

+7
View File
@@ -186,3 +186,10 @@ class LoRARegistry:
self._registry[lora_ref.lora_name] = lora_ref
self._counters[lora_ref.lora_id] = ConcurrentCounter()
return lora_ref
@property
def num_registered_loras(self) -> int:
"""
Returns the total number of LoRA adapters currently registered.
"""
return len(self._registry)