Skip to content

Commit a1ee749

Browse files
committed
Fix Tests
1 parent 1766570 commit a1ee749

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

optimum/intel/openvino/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
}
112112

113113

114-
NEED_CONVERT_TO_FAST_TOKENIZER: List[PreTrainedTokenizer] = [
114+
NEED_CONVERT_TO_FAST_TOKENIZER: List[type(PreTrainedTokenizer)] = [
115115
CLIPTokenizer,
116116
]
117117

@@ -122,7 +122,7 @@ def maybe_convert_tokenizer_to_fast(
122122
if isinstance(hf_tokenizer, PreTrainedTokenizerFast):
123123
return hf_tokenizer
124124

125-
if any(isinstance(type(hf_tokenizer), slow_class) for slow_class in NEED_CONVERT_TO_FAST_TOKENIZER):
125+
if any(isinstance(hf_tokenizer, slow_class) for slow_class in NEED_CONVERT_TO_FAST_TOKENIZER):
126126
try:
127127
return AutoTokenizer.from_pretrained(tokenizer_path)
128128
except Exception:

tests/openvino/test_exporters_cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class OVCLIExportTestCase(unittest.TestCase):
7575
"bert": 1, # no detokenizer
7676
"blenderbot": 2,
7777
"stable-diffusion": 2,
78-
"stable-diffusion-xl": 2,
78+
"stable-diffusion-xl": 4,
7979
}
8080

8181
SUPPORTED_SD_HYBRID_ARCHITECTURES = (

0 commit comments

Comments
 (0)