Merge pull request #124 from RamesTheGeneric/fix_onnxruntime_EP_selection

Add GPU EP options
This commit is contained in:
dfgHiatus authored and GitHub committed 2025-05-20 12:41:07 -05:00
commit dfeeb87e86
1 file changed
+2 -2
+2 -2
View File
@@ -119,8 +119,8 @@ class BabbleProcessor:
self.sess = ort.InferenceSession(
f"{self.default_model}/onnx/model.onnx",
self.opts,
providers=[provider],
provider_options=[{"device_id": self.gpu_index}],
providers=provider,
provider_options=[{"device_id": self.gpu_index}, {"device_id": self.gpu_index}, {}], # We need a dict entry for each EP in our providers list
)
self.input_name = self.sess.get_inputs()[0].name
self.output_name = self.sess.get_outputs()[0].name