Skip to content

Commit cc48e21

Browse files
yechank-nvidiamikeiovine
authored andcommitted
[https://nvbugs/5550722][fix] Fix image load (NVIDIA#8093)
Signed-off-by: yechank <[email protected]>
1 parent f779f18 commit cc48e21

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

tests/unittest/_torch/modeling/test_modeling_qwen2_5vl.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import unittest
33
from copy import deepcopy
44
from dataclasses import dataclass
5+
from pathlib import Path
56
from typing import List
67

78
import pytest
@@ -107,20 +108,24 @@ def __repr__(self) -> str:
107108
class TestQwen2_5_VL(unittest.TestCase):
108109

109110
def get_test_inputs(self, modality: str):
111+
112+
test_data_root = Path(
113+
os.path.join(llm_models_root(), "multimodals", "test_data"))
114+
110115
if modality == "image":
111116
return ["Describe the natural environment in the image."], \
112-
["https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/seashore.png"]
117+
[str(test_data_root / "seashore.png")]
113118
elif modality == "multiple_image":
114119
return ["Describe the difference between the two images."], \
115-
["https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/inpaint.png",
116-
"https://huggingface.co/datasets/Sayali9141/traffic_signal_images/resolve/main/61.jpg"]
120+
[str(test_data_root / "inpaint.png"),
121+
str(test_data_root / "61.jpg")]
117122
elif modality == "video":
118123
return ["Tell me what you see in the video briefly."], \
119-
["https://huggingface.co/datasets/Efficient-Large-Model/VILA-inference-demos/resolve/main/OAI-sora-tokyo-walk.mp4"]
124+
[str(test_data_root / "OAI-sora-tokyo-walk.mp4")]
120125
elif modality == "mixture_text_image":
121126
return ["Describe the scene in the image briefly.",
122127
"Who invented the internet?"], \
123-
["https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/inpaint.png",
128+
[str(test_data_root / "inpaint.png"),
124129
""]
125130
elif modality == "text":
126131
return ["Who invented the internet?"], []

0 commit comments

Comments
 (0)