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
e120533d
Unverified
Commit
e120533d
authored
Sep 17, 2025
by
Cyrus Leung
Committed by
GitHub
Sep 17, 2025
Browse files
[Misc] Avoid use of deprecated `AutoModelForVision2Seq` (#25065)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
2b856970
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
tests/models/multimodal/generation/test_common.py
tests/models/multimodal/generation/test_common.py
+7
-7
No files found.
tests/models/multimodal/generation/test_common.py
View file @
e120533d
...
@@ -10,7 +10,7 @@ from pathlib import PosixPath
...
@@ -10,7 +10,7 @@ from pathlib import PosixPath
import
pytest
import
pytest
from
transformers
import
(
AutoModel
,
AutoModelForImageTextToText
,
from
transformers
import
(
AutoModel
,
AutoModelForImageTextToText
,
AutoModelForTextToWaveform
,
AutoModelForVision2Seq
)
AutoModelForTextToWaveform
)
from
vllm.platforms
import
current_platform
from
vllm.platforms
import
current_platform
from
vllm.utils
import
identity
from
vllm.utils
import
identity
...
@@ -137,7 +137,7 @@ VLM_TEST_SETTINGS = {
...
@@ -137,7 +137,7 @@ VLM_TEST_SETTINGS = {
video_idx_to_prompt
=
lambda
idx
:
"<|vision_start|><|video_pad|><|vision_end|>"
,
# noqa: E501
video_idx_to_prompt
=
lambda
idx
:
"<|vision_start|><|video_pad|><|vision_end|>"
,
# noqa: E501
max_model_len
=
4096
,
max_model_len
=
4096
,
max_num_seqs
=
2
,
max_num_seqs
=
2
,
auto_cls
=
AutoModelFor
Vision2Seq
,
auto_cls
=
AutoModelFor
ImageTextToText
,
vllm_output_post_proc
=
model_utils
.
qwen2_vllm_to_hf_output
,
vllm_output_post_proc
=
model_utils
.
qwen2_vllm_to_hf_output
,
image_size_factors
=
[(),
(
0.25
,),
(
0.25
,
0.25
,
0.25
),
(
0.25
,
0.2
,
0.15
)],
image_size_factors
=
[(),
(
0.25
,),
(
0.25
,
0.25
,
0.25
),
(
0.25
,
0.2
,
0.15
)],
marks
=
[
pytest
.
mark
.
core_model
,
pytest
.
mark
.
cpu_model
],
marks
=
[
pytest
.
mark
.
core_model
,
pytest
.
mark
.
cpu_model
],
...
@@ -502,7 +502,7 @@ VLM_TEST_SETTINGS = {
...
@@ -502,7 +502,7 @@ VLM_TEST_SETTINGS = {
num_video_frames
=
16
,
num_video_frames
=
16
,
max_model_len
=
16384
,
max_model_len
=
16384
,
hf_model_kwargs
=
model_utils
.
llava_onevision_hf_model_kwargs
(
"llava-hf/llava-onevision-qwen2-0.5b-ov-hf"
),
# noqa: E501
hf_model_kwargs
=
model_utils
.
llava_onevision_hf_model_kwargs
(
"llava-hf/llava-onevision-qwen2-0.5b-ov-hf"
),
# noqa: E501
auto_cls
=
AutoModelFor
Vision2Seq
,
auto_cls
=
AutoModelFor
ImageTextToText
,
vllm_output_post_proc
=
model_utils
.
llava_onevision_vllm_to_hf_output
,
vllm_output_post_proc
=
model_utils
.
llava_onevision_vllm_to_hf_output
,
custom_test_opts
=
[
CustomTestOptions
(
custom_test_opts
=
[
CustomTestOptions
(
inputs
=
custom_inputs
.
multi_video_multi_aspect_ratio_inputs
(
inputs
=
custom_inputs
.
multi_video_multi_aspect_ratio_inputs
(
...
@@ -518,7 +518,7 @@ VLM_TEST_SETTINGS = {
...
@@ -518,7 +518,7 @@ VLM_TEST_SETTINGS = {
num_video_frames
=
16
,
num_video_frames
=
16
,
max_model_len
=
4096
,
max_model_len
=
4096
,
max_num_seqs
=
2
,
max_num_seqs
=
2
,
auto_cls
=
AutoModelFor
Vision2Seq
,
auto_cls
=
AutoModelFor
ImageTextToText
,
vllm_output_post_proc
=
model_utils
.
llava_video_vllm_to_hf_output
,
vllm_output_post_proc
=
model_utils
.
llava_video_vllm_to_hf_output
,
),
),
"mantis"
:
VLMTestInfo
(
"mantis"
:
VLMTestInfo
(
...
@@ -680,7 +680,7 @@ VLM_TEST_SETTINGS = {
...
@@ -680,7 +680,7 @@ VLM_TEST_SETTINGS = {
multi_image_prompt
=
"Picture 1: <vlm_image>
\n
Picture 2: <vlm_image>
\n
Describe these two images with one paragraph respectively."
,
# noqa: E501
multi_image_prompt
=
"Picture 1: <vlm_image>
\n
Picture 2: <vlm_image>
\n
Describe these two images with one paragraph respectively."
,
# noqa: E501
max_model_len
=
4096
,
max_model_len
=
4096
,
max_num_seqs
=
2
,
max_num_seqs
=
2
,
auto_cls
=
AutoModelFor
Vision2Seq
,
auto_cls
=
AutoModelFor
ImageTextToText
,
vllm_output_post_proc
=
model_utils
.
qwen2_vllm_to_hf_output
,
vllm_output_post_proc
=
model_utils
.
qwen2_vllm_to_hf_output
,
image_size_factors
=
[(),
(
0.25
,),
(
0.25
,
0.25
,
0.25
),
(
0.25
,
0.2
,
0.15
)],
image_size_factors
=
[(),
(
0.25
,),
(
0.25
,
0.25
,
0.25
),
(
0.25
,
0.2
,
0.15
)],
marks
=
[
pytest
.
mark
.
cpu_model
],
marks
=
[
pytest
.
mark
.
cpu_model
],
...
@@ -784,7 +784,7 @@ VLM_TEST_SETTINGS = {
...
@@ -784,7 +784,7 @@ VLM_TEST_SETTINGS = {
test_type
=
VLMTestType
.
CUSTOM_INPUTS
,
test_type
=
VLMTestType
.
CUSTOM_INPUTS
,
max_model_len
=
16384
,
max_model_len
=
16384
,
max_num_seqs
=
2
,
max_num_seqs
=
2
,
auto_cls
=
AutoModelFor
Vision2Seq
,
auto_cls
=
AutoModelFor
ImageTextToText
,
hf_model_kwargs
=
model_utils
.
llava_onevision_hf_model_kwargs
(
"llava-hf/llava-onevision-qwen2-0.5b-ov-hf"
),
# noqa: E501
hf_model_kwargs
=
model_utils
.
llava_onevision_hf_model_kwargs
(
"llava-hf/llava-onevision-qwen2-0.5b-ov-hf"
),
# noqa: E501
vllm_output_post_proc
=
model_utils
.
llava_onevision_vllm_to_hf_output
,
vllm_output_post_proc
=
model_utils
.
llava_onevision_vllm_to_hf_output
,
custom_test_opts
=
[
CustomTestOptions
(
custom_test_opts
=
[
CustomTestOptions
(
...
@@ -800,7 +800,7 @@ VLM_TEST_SETTINGS = {
...
@@ -800,7 +800,7 @@ VLM_TEST_SETTINGS = {
test_type
=
VLMTestType
.
CUSTOM_INPUTS
,
test_type
=
VLMTestType
.
CUSTOM_INPUTS
,
max_model_len
=
4096
,
max_model_len
=
4096
,
max_num_seqs
=
2
,
max_num_seqs
=
2
,
auto_cls
=
AutoModelFor
Vision2Seq
,
auto_cls
=
AutoModelFor
ImageTextToText
,
vllm_output_post_proc
=
model_utils
.
qwen2_vllm_to_hf_output
,
vllm_output_post_proc
=
model_utils
.
qwen2_vllm_to_hf_output
,
custom_test_opts
=
[
CustomTestOptions
(
custom_test_opts
=
[
CustomTestOptions
(
inputs
=
custom_inputs
.
windows_attention_image_qwen2_5_vl
(),
inputs
=
custom_inputs
.
windows_attention_image_qwen2_5_vl
(),
...
...
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