diff --git a/extensions/tokenizers/src/main/python/djl_converter/huggingface_converter.py b/extensions/tokenizers/src/main/python/djl_converter/huggingface_converter.py index e8d1fcb1ca3..b0c4ed25f8d 100644 --- a/extensions/tokenizers/src/main/python/djl_converter/huggingface_converter.py +++ b/extensions/tokenizers/src/main/python/djl_converter/huggingface_converter.py @@ -84,7 +84,7 @@ def save_onnx_model(self, model_info, task: str, args: Namespace, sys.argv.extend(["--dtype", args.dtype]) if args.trust_remote_code: sys.argv.append("--trust-remote-code") - if os.path.exists(model_id): + if task: sys.argv.extend(["--task", task]) sys.argv.append(temp_dir)