Fix KeyError in prepare_lora_batch when lora_ids contains None (#21974)
This commit is contained in:
@@ -311,6 +311,8 @@ class LoRAManager:
|
||||
lora_ranks = [0] * self.max_loras_per_batch
|
||||
scalings = [0] * self.max_loras_per_batch
|
||||
for i, uid in enumerate(forward_batch.lora_ids):
|
||||
if uid not in self.memory_pool.uid_to_buffer_id:
|
||||
continue
|
||||
weight_indices[i] = self.memory_pool.get_buffer_id(uid)
|
||||
if uid is not None:
|
||||
lora = self.loras[uid]
|
||||
|
||||
Reference in New Issue
Block a user