Closed vymao closed 1 month ago
Hi there π You should be able to export the model without --optimize O1
. Is the O1 optimization necessary for your use-case?
$ optimum-cli export onnx --model MIT/ast-finetuned-audioset-10-10-0.4593 out
Framework not specified. Using pt to export to ONNX.
Downloading config.json: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 26.8k/26.8k [00:00<00:00, 95.3MB/s]
Downloading model.safetensors: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 346M/346M [00:07<00:00, 48.1MB/s]
Automatic task detection to audio-classification.
Downloading (β¦)rocessor_config.json: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 297/297 [00:00<00:00, 1.44MB/s]
Could not find image processor class in the image processor config or the model config. Loading based on pattern matching with the model's feature extractor configuration.
Using the export variant default. Available variants are:
- default: The default ONNX variant.
Could not find image processor class in the image processor config or the model config. Loading based on pattern matching with the model's feature extractor configuration.
Using framework PyTorch: 2.1.0+cu121
Post-processing the exported models...
Deduplicating shared (tied) weights...
Validating ONNX model out/model.onnx...
-[β] ONNX model output names match reference model (logits)
- Validating ONNX Model output "logits":
-[β] (2, 527) matches (2, 527)
-[β] all values close (atol: 0.0001)
The ONNX export succeeded and the exported model was saved at: out
It seems to me like this issue has been solved. Feel free to reopen if you disagree :)
Feature request
Would be great if we could export
audio-spectrogram-transformer
-type models using Optimum to ONNX. Right now, I get this error:Motivation
Would like to use this in ONNX.
Your contribution
No