My tool is vs2022,net6.0, I can rebuild the project from sln
When I configured the model path and chose to run cpu only,an error will occur.
'''
Microsoft.ML.OnnxRuntime.OnnxRuntimeException:“[ErrorCode:InvalidArgument] Tensor element data type discovered: Int64 metadata expected: Float”
'''
'''
I checked the code location is UNet.cs line105
input = CreateUnetModelInput(textEmbeddings, latentModelInput, timesteps[t]);
// Run Inference
var output = unetSession.Run(input);
'''
input is a list with three objects.I don't know why this mistake happened,I guess it's because of the onnxruntime version.
But the onnxruntime is built automatically by sln
One of your input types has Int64 instead of float. You need to update the input type to match what the model expects. You can use a tool like Netron to figure out which input value is wrong.
My tool is vs2022,net6.0, I can rebuild the project from sln When I configured the model path and chose to run cpu only,an error will occur. ''' Microsoft.ML.OnnxRuntime.OnnxRuntimeException:“[ErrorCode:InvalidArgument] Tensor element data type discovered: Int64 metadata expected: Float” '''
''' I checked the code location is UNet.cs line105 input = CreateUnetModelInput(textEmbeddings, latentModelInput, timesteps[t]); // Run Inference var output = unetSession.Run(input); ''' input is a list with three objects.I don't know why this mistake happened,I guess it's because of the onnxruntime version. But the onnxruntime is built automatically by sln