".github/vscode:/vscode.git/clone" did not exist on "ca9ed5e8d1f63cde023f0b66e3323c172cb813d8"
Unverified Commit 41273fd7 authored by Yusong Gao's avatar Yusong Gao Committed by GitHub
Browse files

fix: handle None multimodal_inputs during merging and filtering batches in...

fix: handle None multimodal_inputs during merging and filtering batches in disaggregation decode mode (#6169)
parent e9bebafb
......@@ -1485,6 +1485,7 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
self.encoder_lens_cpu = [self.encoder_lens_cpu[i] for i in keep_indices]
self.reqs = [self.reqs[i] for i in keep_indices]
if self.multimodal_inputs is not None:
self.multimodal_inputs = [self.multimodal_inputs[i] for i in keep_indices]
self.req_pool_indices = self.req_pool_indices[keep_indices_device]
self.seq_lens = self.seq_lens[keep_indices_device]
......@@ -1534,6 +1535,7 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
self.top_logprobs_nums = [0] * len(self.reqs) + other.top_logprobs_nums
self.token_ids_logprobs = [None] * len(self.reqs) + other.token_ids_logprobs
self.reqs.extend(other.reqs)
if self.multimodal_inputs is not None:
self.multimodal_inputs.extend(other.multimodal_inputs)
self.return_logprob |= other.return_logprob
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment