diff --git a/hubconf.py b/hubconf.py index bca8829..145be41 100644 --- a/hubconf.py +++ b/hubconf.py @@ -25,11 +25,11 @@ def silero_vad(onnx=False, force_onnx_cpu=False): Please see https://github.com/snakers4/silero-vad for usage examples """ - installed_version = torch.__version__ - supported_version = '1.12.0' - - if versiontuple(installed_version) < versiontuple(supported_version): - raise Exception(f'Please install torch {supported_version} or greater ({installed_version} installed)') + if not onnx: + installed_version = torch.__version__ + supported_version = '1.12.0' + if versiontuple(installed_version) < versiontuple(supported_version): + raise Exception(f'Please install torch {supported_version} or greater ({installed_version} installed)') hub_dir = torch.hub.get_dir() if onnx: