File tree 1 file changed +6
-4
lines changed
optimum/exporters/openvino
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -381,14 +381,16 @@ class StoreAttr(object):
381
381
feature_extractor .save_pretrained (output .joinpath ("feature_extractor" ))
382
382
383
383
tokenizer = getattr (model , "tokenizer" , None )
384
- if convert_tokenizer and tokenizer is not None and is_openvino_tokenizers_available () :
384
+ if tokenizer is not None :
385
385
tokenizer .save_pretrained (output .joinpath ("tokenizer" ))
386
- export_tokenizer (tokenizer , output )
386
+ if convert_tokenizer and is_openvino_tokenizers_available ():
387
+ export_tokenizer (tokenizer , output )
387
388
388
389
tokenizer_2 = getattr (model , "tokenizer_2" , None )
389
- if convert_tokenizer and tokenizer_2 is not None and is_openvino_tokenizers_available () :
390
+ if tokenizer_2 is not None :
390
391
tokenizer_2 .save_pretrained (output .joinpath ("tokenizer_2" ))
391
- export_tokenizer (tokenizer , output , suffix = "_2" )
392
+ if convert_tokenizer and is_openvino_tokenizers_available ():
393
+ export_tokenizer (tokenizer , output , suffix = "_2" )
392
394
393
395
model .save_config (output )
394
396
You can’t perform that action at this time.
0 commit comments