This repository was archived by the owner on Dec 9, 2025. It is now read-only.

Description
I was trying to use this with the Microsoft Olive optimized Float16 Stable diffusion models and it was throwing an exception.
Microsoft.ML.OnnxRuntime.OnnxRuntimeException: '[ErrorCode:Fail] D:\a\_work\1\s\onnxruntime\core\providers\dml\DmlExecutionProvider\src\ExecutionProvider.cpp(935)\onnxruntime.DLL!00007FFC53310120: (caller: 00007FFC5330BE42) Exception(1) tid(1e34) 80070057 The parameter is incorrect.
at line
var results = await _onnxModelService.RunInferenceAsync(model, OnnxModelType.TextEncoder, inputs, outputs);
in function
public async Task<float[]> EncodeTokensAsync(IModelOptions model, int[] tokenizedInput)
in file PromptService.cs
The model I used is here
https://huggingface.co/softwareweaver/photon
It was converted to ONNX using the Microsoft Olive toolchain
https://github.com/microsoft/Olive
Thanks,
Ash