Skip to content

Commit a9c6b52

Browse files
authored
[Bugfix] Fix qwen2.5-vl positon input bug (#639)
### What this PR does / why we need it? Fix qwen2.5-vl positon input bug, fix #625 `TypeError: 'NoneType' object is not iterable` Signed-off-by: wangli <wangli858794774@gmail.com>
1 parent 866ce71 commit a9c6b52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vllm_ascend/worker/model_runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,8 @@ def build(self) -> ModelInputForNPU:
556556
#print(f"before tensor input_positions: {input_positions}")
557557
#print(f"before list seq_lens: {seq_lens}")
558558
input_tokens = flatten_2d_lists(input_tokens)
559-
input_positions = flatten_2d_lists(input_positions)
559+
if input_positions:
560+
input_positions = flatten_2d_lists(input_positions)
560561
if graph_pad_size != -1 and not is_prompt:
561562
input_tokens.extend(itertools.repeat(0, graph_pad_size))
562563
input_positions.extend( # type: ignore

0 commit comments

Comments
 (0)