Loading ONNX model requires config file
Hey! I believe this is a bug.
Post ONNX conversion w/ convert_to_onnx.py, a config file is not created, however during inference using GLiNER.from_pretrained() with `load_onnx_model=True` specified, a gliner_config file is required.
I tried copying the original config file to the onnx_model directory, it still does not work. I believe this check:
```
# Load config
config_file = model_dir / "gliner_config.json"
if not config_file.exists():
raise FileNotFoundError(f"No config file found in {model_dir}")
```
should be moved to the if block:
```
if not load_onnx_model:
...
```
I'm unsure if this would cause further breaking changes. This is reproducable across at least 2 environments.
gliner version == 0.2.24
4 条评论