diff --git a/ultralytics/engine/exporter.py b/ultralytics/engine/exporter.py index 3932fea19..d26feb109 100644 --- a/ultralytics/engine/exporter.py +++ b/ultralytics/engine/exporter.py @@ -1041,7 +1041,7 @@ class Exporter: @try_export def export_mct(self, prefix=colorstr("Sony MCT:")): - check_requirements("mct-nightly") + check_requirements(["mct-nightly","sony-custom-layers[torch]"]) import model_compression_toolkit as mct import onnx from model_compression_toolkit.core import BitWidthConfig diff --git a/ultralytics/nn/autobackend.py b/ultralytics/nn/autobackend.py index c809c0751..57467626d 100644 --- a/ultralytics/nn/autobackend.py +++ b/ultralytics/nn/autobackend.py @@ -178,6 +178,7 @@ class AutoBackend(nn.Module): providers = ["CUDAExecutionProvider", "CPUExecutionProvider"] if cuda else ["CPUExecutionProvider"] if mct: + check_requirements(["mct-nightly","sony-custom-layers[torch]"]) LOGGER.info(f"Loading {w} for ONNX MCT quantization inference...") import mct_quantizers as mctq from sony_custom_layers.pytorch.object_detection import nms_ort # noqa