Skip to content

Commit 5ea82c7

Browse files
author
wangzaijun
committed
fix
1 parent b091ccf commit 5ea82c7

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

lightllm/server/core/objs/req.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,13 @@ def get_prompt_ids_numpy(self):
234234
return self.shm_prompt_ids.arr[: self.input_len]
235235

236236
def to_router_rpc_obj(self):
237-
if hasattr(self, "multimodal_params"):
238-
return (
239-
self.request_id,
240-
self.index_in_shm_mem,
241-
self.multimodal_params,
242-
self.sample_params.suggested_dp_index,
243-
)
244-
else:
245-
return (self.request_id, self.index_in_shm_mem, None, self.sample_params.suggested_dp_index)
237+
assert hasattr(self, "multimodal_params")
238+
return (
239+
self.request_id,
240+
self.index_in_shm_mem,
241+
self.multimodal_params,
242+
self.sample_params.suggested_dp_index,
243+
)
246244

247245
def can_release(self):
248246
# 只有管理节点有一个引用

lightllm/server/router/model_infer/infer_batch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def __init__(
320320
req_id: int,
321321
req_idx: int,
322322
shm_index: int,
323-
multimodal_params=None,
323+
multimodal_params: MultimodalParams,
324324
vocab_size: int = -1,
325325
init_prefix_cache: bool = True,
326326
):

0 commit comments

Comments
 (0)