Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
185ccc2d
"docs/vscode:/vscode.git/clone" did not exist on "7f89a594dd985f30d67c351b6f3aa94193bcb889"
Commit
185ccc2d
authored
Feb 06, 2026
by
guanyu1
Browse files
修复qwen2-vl-7b图像处理部分张量创建在cpu上导致报错问题
parent
70506d98
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
vllm/model_executor/models/qwen2_vl.py
vllm/model_executor/models/qwen2_vl.py
+4
-1
No files found.
vllm/model_executor/models/qwen2_vl.py
View file @
185ccc2d
...
@@ -746,7 +746,10 @@ class Qwen2VisionTransformer(nn.Module):
...
@@ -746,7 +746,10 @@ class Qwen2VisionTransformer(nn.Module):
rotary_pos_emb
=
self
.
rot_pos_emb
(
grid_thw
)
rotary_pos_emb
=
self
.
rot_pos_emb
(
grid_thw
)
# compute cu_seqlens
# compute cu_seqlens
grid_thw_
=
torch
.
tensor
(
grid_thw
)
grid_thw_
=
torch
.
tensor
(
grid_thw
,
device
=
self
.
device
,
dtype
=
torch
.
int32
)
cu_seqlens
=
torch
.
repeat_interleave
(
grid_thw_
[:,
1
]
*
grid_thw_
[:,
2
],
cu_seqlens
=
torch
.
repeat_interleave
(
grid_thw_
[:,
1
]
*
grid_thw_
[:,
2
],
grid_thw_
[:,
0
]).
cumsum
(
grid_thw_
[:,
0
]).
cumsum
(
dim
=
0
,
dtype
=
torch
.
int32
)
dim
=
0
,
dtype
=
torch
.
int32
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment