Move trt error

This commit is contained in:
Nicolas Mowen 2025-07-07 17:45:39 -06:00
parent d69916694b
commit 1e6c1bc331

View File

@ -43,14 +43,6 @@ if TRT_SUPPORT:
return logging.CRITICAL
else:
return logging.DEBUG
elif platform.machine() == "x86_64":
logger.error(
"TensorRT detector is no longer supported on amd64 system. Please use ONNX detector instead, see https://docs.frigate.video/configuration/object_detectors#onnx for more information."
)
raise ImportError(
"TensorRT detector is no longer supported on amd64 system. Please use ONNX detector instead, see https://docs.frigate.video/configuration/object_detectors#onnx for more information."
)
class TensorRTDetectorConfig(BaseDetectorConfig):
type: Literal[DETECTOR_KEY]
@ -227,6 +219,15 @@ class TensorRtDetector(DetectionApi):
]
def __init__(self, detector_config: TensorRTDetectorConfig):
if platform.machine() == "x86_64":
logger.error(
"TensorRT detector is no longer supported on amd64 system. Please use ONNX detector instead, see https://docs.frigate.video/configuration/object_detectors#onnx for more information."
)
raise ImportError(
"TensorRT detector is no longer supported on amd64 system. Please use ONNX detector instead, see https://docs.frigate.video/configuration/object_detectors#onnx for more information."
)
assert TRT_SUPPORT, (
f"TensorRT libraries not found, {DETECTOR_KEY} detector not present"
)