Skip to content

Commit f516421

Browse files
authored
[Bug Fix] fix vl V1 schedule bug (#3323)
* [Bug Fix] fix vl V1 schedule bug * fix format
1 parent b808c49 commit f516421

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

fastdeploy/engine/sched/resource_manager_v1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ def _get_num_new_tokens(self, request, token_budget):
195195
)
196196
request.num_image_end = img_num_per_boundary[new_boundary_idx]
197197

198-
request.num_image_end = img_num_per_boundary[new_boundary_idx]
199198
request.image_type_ids_start = np.sum(grid_thw[: request.num_image_start, 0])
200199
request.image_type_ids_end = np.sum(grid_thw[: request.num_image_end, 0])
201200
request.image_start = np.sum(np.prod(grid_thw[: request.num_image_start], axis=1))

fastdeploy/worker/worker_process.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import paddle.distributed as dist
2525
from paddle.distributed import fleet
2626

27+
from fastdeploy import envs
2728
from fastdeploy.config import (
2829
CacheConfig,
2930
DecodingConfig,
@@ -289,8 +290,9 @@ def event_loop_normal(self) -> None:
289290
if self.local_rank % mp_num_per_node == 0:
290291
if self.task_queue.num_tasks() > 0:
291292
# VL only support 1 batch to prefill
292-
293-
if not self.fd_config.model_config.enable_mm or not self.worker.exist_prefill():
293+
if envs.ENABLE_V1_KVCACHE_SCHEDULER or not (
294+
self.fd_config.model_config.enable_mm and self.worker.exist_prefill()
295+
):
294296
if self.nnode > 1 and self.parallel_config.tensor_parallel_size > self.max_chips_per_node:
295297
self.task_queue.read_finish_flag.set(1)
296298
else:

0 commit comments

Comments
 (0)