File size: 426 Bytes
88e3f4a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import pytest
from omniff.models.vlm import VLMModel
def test_vlm_interface():
model = VLMModel(model_id="Qwen/Qwen2.5-VL-3B-Instruct", device="cpu")
assert not model.is_loaded
def test_vlm_infer_not_loaded():
model = VLMModel(model_id="Qwen/Qwen2.5-VL-3B-Instruct", device="cpu")
with pytest.raises(RuntimeError, match="not loaded"):
model.infer({"image_path": "test.jpg", "prompt": "describe"})
|