catch not implemented exception

This commit is contained in:
Josh Hawkins 2025-04-07 21:36:16 -05:00
parent 921908fe33
commit 8b204ebea2

View File

@ -94,9 +94,13 @@ class ONNXModelRunner:
if self.type == "ov":
infer_request = self.interpreter.create_infer_request()
# This ensures the model starts with a clean state for each sequence
# Important for RNN models like PaddleOCR recognition
infer_request.reset_state()
try:
# This ensures the model starts with a clean state for each sequence
# Important for RNN models like PaddleOCR recognition
infer_request.reset_state()
except Exception:
# this will raise an exception for models with AUTO set as the device
pass
outputs = infer_request.infer(input)